#[repr(transparent)]pub struct MemoryPage<S: PageSize> {
    value: u64,
    _phantom: PhantomData<S>,
}Expand description
A page base address (lower S::SHIFT bits are zero).
Fields§
§value: u64§_phantom: PhantomData<S>Implementations§
Source§impl<S: PageSize> MemoryPage<S>
 
impl<S: PageSize> MemoryPage<S>
Sourcepub const fn from_addr(addr: MemoryAddress) -> Self
 
pub const fn from_addr(addr: MemoryAddress) -> Self
Create from a raw value, aligning down to the page boundary.
Sourcepub fn new_aligned(addr: MemoryAddress) -> Self
 
pub fn new_aligned(addr: MemoryAddress) -> Self
Create from a raw value that must already be aligned. Panics in debug if unaligned (no runtime cost in release).
Sourcepub const fn base(self) -> MemoryAddress
 
pub const fn base(self) -> MemoryAddress
Return the base as MemoryAddress.
Sourcepub const fn join(self, off: MemoryAddressOffset<S>) -> MemoryAddress
 
pub const fn join(self, off: MemoryAddressOffset<S>) -> MemoryAddress
Combine with an offset to form a full address.
Sourcepub const fn checked_join(
    self,
    off: MemoryAddressOffset<S>,
) -> Option<MemoryAddress>
 
pub const fn checked_join( self, off: MemoryAddressOffset<S>, ) -> Option<MemoryAddress>
Checked add of an offset, returning None on overflow.
Trait Implementations§
Source§impl<S: PageSize> Add<MemoryAddressOffset<S>> for MemoryPage<S>
 
impl<S: PageSize> Add<MemoryAddressOffset<S>> for MemoryPage<S>
Source§type Output = MemoryAddress
 
type Output = MemoryAddress
The resulting type after applying the 
+ operator.Source§impl<S: Clone + PageSize> Clone for MemoryPage<S>
 
impl<S: Clone + PageSize> Clone for MemoryPage<S>
Source§fn clone(&self) -> MemoryPage<S>
 
fn clone(&self) -> MemoryPage<S>
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<S: PageSize> Debug for MemoryPage<S>
 
impl<S: PageSize> Debug for MemoryPage<S>
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<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<S> From<MemoryPage<S>> for PhysicalPage<S>where
    S: PageSize,
 
impl<S> From<MemoryPage<S>> for PhysicalPage<S>where
    S: PageSize,
Source§fn from(p: MemoryPage<S>) -> Self
 
fn from(p: MemoryPage<S>) -> Self
Converts to this type from the input type.
Source§impl<S> From<MemoryPage<S>> for VirtualPage<S>where
    S: PageSize,
 
impl<S> From<MemoryPage<S>> for VirtualPage<S>where
    S: PageSize,
Source§fn from(p: MemoryPage<S>) -> Self
 
fn from(p: MemoryPage<S>) -> Self
Converts to this type from the input type.
Source§impl<S: Ord + PageSize> Ord for MemoryPage<S>
 
impl<S: Ord + PageSize> Ord for MemoryPage<S>
Source§fn cmp(&self, other: &MemoryPage<S>) -> Ordering
 
fn cmp(&self, other: &MemoryPage<S>) -> 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<S: PartialOrd + PageSize> PartialOrd for MemoryPage<S>
 
impl<S: PartialOrd + PageSize> PartialOrd for MemoryPage<S>
impl<S: Copy + PageSize> Copy for MemoryPage<S>
impl<S: Eq + PageSize> Eq for MemoryPage<S>
impl<S: PageSize> StructuralPartialEq for MemoryPage<S>
Auto Trait Implementations§
impl<S> Freeze for MemoryPage<S>
impl<S> RefUnwindSafe for MemoryPage<S>where
    S: RefUnwindSafe,
impl<S> Send for MemoryPage<S>where
    S: Send,
impl<S> Sync for MemoryPage<S>where
    S: Sync,
impl<S> Unpin for MemoryPage<S>where
    S: Unpin,
impl<S> UnwindSafe for MemoryPage<S>where
    S: 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