#[repr(transparent)]pub struct MemoryAddress(u64);Tuple Fields§
§0: u64Implementations§
Source§impl MemoryAddress
 
impl MemoryAddress
pub fn from_nonnull<T>(ptr: NonNull<T>) -> Self
pub fn from_ptr<T>(ptr: *const T) -> Self
pub const fn new(value: u64) -> Self
pub const fn as_u64(self) -> u64
Sourcepub const fn page<S: PageSize>(self) -> MemoryPage<S>
 
pub const fn page<S: PageSize>(self) -> MemoryPage<S>
The page for size S that contains this address (lower bits zeroed).
Sourcepub const fn offset<S: PageSize>(self) -> MemoryAddressOffset<S>
 
pub const fn offset<S: PageSize>(self) -> MemoryAddressOffset<S>
The offset within the page of size S that contains this address.
Sourcepub const fn split<S: PageSize>(self) -> (MemoryPage<S>, MemoryAddressOffset<S>)
 
pub const fn split<S: PageSize>(self) -> (MemoryPage<S>, MemoryAddressOffset<S>)
Split into (MemoryPage<S>, MemoryAddressOffset<S>).
Sourcepub const fn align_down<S: PageSize>(self) -> Self
 
pub const fn align_down<S: PageSize>(self) -> Self
Align down to page boundary S.
Trait Implementations§
Source§impl Add<u64> for MemoryAddress
 
impl Add<u64> for MemoryAddress
Source§impl AddAssign<u64> for MemoryAddress
 
impl AddAssign<u64> for MemoryAddress
Source§fn add_assign(&mut self, rhs: u64)
 
fn add_assign(&mut self, rhs: u64)
Performs the 
+= operation. Read moreSource§impl Clone for MemoryAddress
 
impl Clone for MemoryAddress
Source§fn clone(&self) -> MemoryAddress
 
fn clone(&self) -> MemoryAddress
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 moreSource§impl Debug for MemoryAddress
 
impl Debug for MemoryAddress
Source§impl Default for MemoryAddress
 
impl Default for MemoryAddress
Source§fn default() -> MemoryAddress
 
fn default() -> MemoryAddress
Returns the “default value” for a type. Read more
Source§impl Display for MemoryAddress
 
impl Display for MemoryAddress
Source§impl<S: PageSize> From<MemoryAddress> for MemoryAddressOffset<S>
 
impl<S: PageSize> From<MemoryAddress> for MemoryAddressOffset<S>
Source§fn from(addr: MemoryAddress) -> Self
 
fn from(addr: MemoryAddress) -> Self
Converts to this type from the input type.
Source§impl<S: PageSize> From<MemoryAddress> for MemoryPage<S>
 
impl<S: PageSize> From<MemoryAddress> for MemoryPage<S>
Source§fn from(addr: MemoryAddress) -> Self
 
fn from(addr: MemoryAddress) -> Self
Converts to this type from the input type.
Source§impl From<MemoryAddress> for u64
 
impl From<MemoryAddress> for u64
Source§fn from(a: MemoryAddress) -> Self
 
fn from(a: MemoryAddress) -> Self
Converts to this type from the input type.
Source§impl<S> From<MemoryPage<S>> for MemoryAddresswhere
    S: PageSize,
 
impl<S> From<MemoryPage<S>> for MemoryAddresswhere
    S: PageSize,
Source§fn from(value: MemoryPage<S>) -> Self
 
fn from(value: MemoryPage<S>) -> Self
Converts to this type from the input type.
Source§impl From<u64> for MemoryAddress
 
impl From<u64> for MemoryAddress
Source§impl Hash for MemoryAddress
 
impl Hash for MemoryAddress
Source§impl Ord for MemoryAddress
 
impl Ord for MemoryAddress
Source§fn cmp(&self, other: &MemoryAddress) -> Ordering
 
fn cmp(&self, other: &MemoryAddress) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MemoryAddress
 
impl PartialEq for MemoryAddress
Source§impl PartialOrd for MemoryAddress
 
impl PartialOrd for MemoryAddress
impl Copy for MemoryAddress
impl Eq for MemoryAddress
impl StructuralPartialEq for MemoryAddress
Auto Trait Implementations§
impl Freeze for MemoryAddress
impl RefUnwindSafe for MemoryAddress
impl Send for MemoryAddress
impl Sync for MemoryAddress
impl Unpin for MemoryAddress
impl UnwindSafe for MemoryAddress
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