pub struct WideVolatilePtr<'a, T, A>where
T: ?Sized,{ /* private fields */ }
Expand description
A wide volatile pointer for 64-bit fields.
In virtio, 64-bit fields are to be treated as two 32-bit fields, with low 32 bit part followed by the high 32 bit part.
This type mimics VolatilePtr
, and allows easy access to 64-bit fields.
Implementations§
Source§impl<'a, T, A> WideVolatilePtr<'a, T, A>
impl<'a, T, A> WideVolatilePtr<'a, T, A>
Sourcepub fn from_low_high(
low: VolatilePtr<'a, T, A>,
high: VolatilePtr<'a, T, A>,
) -> Self
pub fn from_low_high( low: VolatilePtr<'a, T, A>, high: VolatilePtr<'a, T, A>, ) -> Self
Creates a new wide volatile pointer from pointers to the low and to the high part.
Source§impl<'a, A> WideVolatilePtr<'a, le32, A>
impl<'a, A> WideVolatilePtr<'a, le32, A>
Sourcepub fn read(self) -> le64where
A: Readable,
pub fn read(self) -> le64where
A: Readable,
Performs a volatile read of the contained value.
See VolatilePtr::read
.
Sourcepub fn write(self, value: le64)where
A: Writable,
pub fn write(self, value: le64)where
A: Writable,
Performs a volatile write, setting the contained value to the given value
.
See VolatilePtr::write
.
Source§impl<'a, A> WideVolatilePtr<'a, be32, A>
impl<'a, A> WideVolatilePtr<'a, be32, A>
Sourcepub fn read(self) -> be64where
A: Readable,
pub fn read(self) -> be64where
A: Readable,
Performs a volatile read of the contained value.
See VolatilePtr::read
.
Sourcepub fn write(self, value: be64)where
A: Writable,
pub fn write(self, value: be64)where
A: Writable,
Performs a volatile write, setting the contained value to the given value
.
See VolatilePtr::write
.
Trait Implementations§
Source§impl<'a, T, A> Clone for WideVolatilePtr<'a, T, A>where
T: ?Sized,
impl<'a, T, A> Clone for WideVolatilePtr<'a, T, A>where
T: ?Sized,
impl<'a, T, A> Copy for WideVolatilePtr<'a, T, A>where
T: ?Sized,
Auto Trait Implementations§
impl<'a, T, A> Freeze for WideVolatilePtr<'a, T, A>where
T: ?Sized,
impl<'a, T, A> RefUnwindSafe for WideVolatilePtr<'a, T, A>
impl<'a, T, A> !Send for WideVolatilePtr<'a, T, A>
impl<'a, T, A> !Sync for WideVolatilePtr<'a, T, A>
impl<'a, T, A> Unpin for WideVolatilePtr<'a, T, A>
impl<'a, T, A> UnwindSafe for WideVolatilePtr<'a, T, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more