pub struct MachineRegister { /* private fields */ }Expand description
MachineRegister is a datatype that can hold exactly the contents of a
register with no additional semantic information.
MachineRegister is useful when you know data is the size of a register,
but not its true data type. In the future it may be possible, useful, or
necessary to change the implementation of MachineRegister, however, the
semantics will remain. No use of MachineRegister should assume a
particular Rust implementation or any semantics other this description.
Implementations§
Source§impl MachineRegister
impl MachineRegister
Sourcepub fn as_capability_ptr(self) -> CapabilityPtr
pub fn as_capability_ptr(self) -> CapabilityPtr
Returns this MachineRegister as a CapabilityPtr.
If this MachineRegister contains a pointer with provenance and/or
authority, the returned CapabilityPtr will have the same provenance
and/or authority.
Sourcepub fn as_usize(self) -> usize
pub fn as_usize(self) -> usize
Returns this MachineRegister as a usize.
This is intended for use on MachineRegisters created from a
usize, in which case the original usize will be returned. If
this MachineRegister was created from a pointer, this returns the
pointer’s address (without exposing provenance).
Trait Implementations§
Source§impl Clone for MachineRegister
impl Clone for MachineRegister
Source§fn clone(&self) -> MachineRegister
fn clone(&self) -> MachineRegister
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MachineRegister
impl Debug for MachineRegister
Source§impl Default for MachineRegister
impl Default for MachineRegister
Source§fn default() -> MachineRegister
fn default() -> MachineRegister
Source§impl From<CapabilityPtr> for MachineRegister
impl From<CapabilityPtr> for MachineRegister
Source§fn from(from: CapabilityPtr) -> Self
fn from(from: CapabilityPtr) -> Self
Creates a MachineRegister containing this CapabilityPtr,
including its provenance.