pub struct SimpleVolAddr<T> { /* private fields */ }
Expand description
Represents a simple MMIO address that can be safely read or written.
Unlike with raw pointers, this type favors unsafe construction and then assumes that all usage is safe once the value has been constructed.
The convention is that addresses using this type are “plain” addresses.
- Reads will just get the current value (without any other side effect).
- Writes will set a new value without changing any other memory of the system (though usually there’s a hardware side effect).
- If you perform a write, and then you immediately perform a read, you’ll read back exactly whatever you just wrote (the same as with normal memory).
For addresses where there’s anything weird going on (read-only, write-only, read and write represent different effects, etc) then other volatile address types are used.
Note: values of this type can safely alias one another.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for SimpleVolAddr<T>
impl<T: Clone> Clone for SimpleVolAddr<T>
Source§fn clone(&self) -> SimpleVolAddr<T>
fn clone(&self) -> SimpleVolAddr<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for SimpleVolAddr<T>
impl<T: Debug> Debug for SimpleVolAddr<T>
Source§impl<T> PartialEq for SimpleVolAddr<T>
impl<T> PartialEq for SimpleVolAddr<T>
impl<T: Copy> Copy for SimpleVolAddr<T>
impl<T> Eq for SimpleVolAddr<T>
Auto Trait Implementations§
impl<T> Freeze for SimpleVolAddr<T>
impl<T> RefUnwindSafe for SimpleVolAddr<T>where
T: RefUnwindSafe,
impl<T> Send for SimpleVolAddr<T>where
T: Send,
impl<T> Sync for SimpleVolAddr<T>where
T: Sync,
impl<T> Unpin for SimpleVolAddr<T>where
T: Unpin,
impl<T> UnwindSafe for SimpleVolAddr<T>where
T: UnwindSafe,
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