pub struct TORUserPMPCFG(/* private fields */);
Expand description
A pmpcfg
octet for a user-mode (non-locked) TOR-addressed PMP region.
This is a wrapper around a pmpcfg_octet
(u8
) register type, which
guarantees that the wrapped pmpcfg
octet is always set to be either
TORUserPMPCFG::OFF
(set to 0x00
), or in a non-locked, TOR-addressed
configuration.
By accepting this type, PMP implements can rely on the above properties to
hold by construction and avoid runtime checks. For example, this type is
used in the TORUserPMP::configure_pmp
method.
Implementations§
Source§impl TORUserPMPCFG
impl TORUserPMPCFG
pub const OFF: TORUserPMPCFG
Sourcepub fn get(&self) -> u8
pub fn get(&self) -> u8
Extract the u8
representation of the pmpcfg_octet
register.
Sourcepub fn get_reg(&self) -> LocalRegisterCopy<u8, Register>
pub fn get_reg(&self) -> LocalRegisterCopy<u8, Register>
Extract a copy of the contained pmpcfg_octet
register.
Trait Implementations§
Source§impl Clone for TORUserPMPCFG
impl Clone for TORUserPMPCFG
Source§fn clone(&self) -> TORUserPMPCFG
fn clone(&self) -> TORUserPMPCFG
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 Debug for TORUserPMPCFG
impl Debug for TORUserPMPCFG
Source§impl From<Permissions> for TORUserPMPCFG
impl From<Permissions> for TORUserPMPCFG
Source§fn from(p: Permissions) -> Self
fn from(p: Permissions) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TORUserPMPCFG
impl PartialEq for TORUserPMPCFG
impl Copy for TORUserPMPCFG
impl Eq for TORUserPMPCFG
Auto Trait Implementations§
impl Freeze for TORUserPMPCFG
impl RefUnwindSafe for TORUserPMPCFG
impl Send for TORUserPMPCFG
impl Sync for TORUserPMPCFG
impl Unpin for TORUserPMPCFG
impl UnwindSafe for TORUserPMPCFG
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