Lines Matching refs:T
71 pub struct ReadOnly<T: Copy>(T);
74 impl<T: Copy> ReadOnly<T> {
76 pub fn new(value: T) -> Self { in new()
84 pub struct WriteOnly<T: Copy>(T);
89 pub struct Volatile<T: Copy>(T);
92 impl<T: Copy> Volatile<T> {
94 pub fn new(value: T) -> Self { in new()
100 pub trait VolatileReadable<T> {
102 unsafe fn vread(self) -> T; in vread() argument
105 impl<T: Copy> VolatileReadable<T> for *const ReadOnly<T> {
106 unsafe fn vread(self) -> T { in vread() argument
111 impl<T: Copy> VolatileReadable<T> for *const Volatile<T> {
112 unsafe fn vread(self) -> T { in vread() argument
118 pub trait VolatileWritable<T> {
120 unsafe fn vwrite(self, value: T); in vwrite() argument
123 impl<T: Copy> VolatileWritable<T> for *mut WriteOnly<T> {
124 unsafe fn vwrite(self, value: T) { in vwrite() argument
125 (self as *mut T).write_volatile(value) in vwrite()
129 impl<T: Copy> VolatileWritable<T> for *mut Volatile<T> {
130 unsafe fn vwrite(self, value: T) { in vwrite() argument
131 (self as *mut T).write_volatile(value) in vwrite()