pub struct CsrAddress(/* private fields */);Expand description
A wrapper for integers guaranteed to be less than 4096 that is used to represent CSR addresses.
Implementations§
Source§impl CsrAddress
impl CsrAddress
Sourcepub const fn new(address: u16) -> Option<CsrAddress>
pub const fn new(address: u16) -> Option<CsrAddress>
Creates a new CsrAddress if the given address is less than 4096.
Sourcepub const unsafe fn new_unchecked(address: u16) -> CsrAddress
pub const unsafe fn new_unchecked(address: u16) -> CsrAddress
Creates a new CsrAddress and assumes that the given address is less than 4096.
§Safety
address must be less than 4096. If it is not, undefined behavior may be invoked,
because users of this type are permitted to assume that the interior address is
less than 4096.
Trait Implementations§
Source§impl Clone for CsrAddress
impl Clone for CsrAddress
Source§fn clone(&self) -> CsrAddress
fn clone(&self) -> CsrAddress
Returns a duplicate 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 moreimpl Copy for CsrAddress
Auto Trait Implementations§
impl Freeze for CsrAddress
impl RefUnwindSafe for CsrAddress
impl Send for CsrAddress
impl Sync for CsrAddress
impl Unpin for CsrAddress
impl UnwindSafe for CsrAddress
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