Lines Matching refs:T
4 pub struct ReadOnly<T: Copy>(T);
6 impl<T: Copy> ReadOnly<T> {
8 pub fn new(value: T) -> Self { in new()
16 pub struct WriteOnly<T: Copy>(T);
21 pub struct Volatile<T: Copy>(T);
23 impl<T: Copy> Volatile<T> {
25 pub fn new(value: T) -> Self { in new()
31 pub trait VolatileReadable<T> {
33 unsafe fn vread(self) -> T; in vread() argument
36 impl<T: Copy> VolatileReadable<T> for *const ReadOnly<T> {
37 unsafe fn vread(self) -> T { in vread() argument
42 impl<T: Copy> VolatileReadable<T> for *const Volatile<T> {
43 unsafe fn vread(self) -> T { in vread() argument
49 pub trait VolatileWritable<T> {
51 unsafe fn vwrite(self, value: T); in vwrite() argument
54 impl<T: Copy> VolatileWritable<T> for *mut WriteOnly<T> {
55 unsafe fn vwrite(self, value: T) { in vwrite() argument
56 (self as *mut T).write_volatile(value) in vwrite()
60 impl<T: Copy> VolatileWritable<T> for *mut Volatile<T> {
61 unsafe fn vwrite(self, value: T) { in vwrite() argument
62 (self as *mut T).write_volatile(value) in vwrite()