Struct kernel::mem::address::page_number::PageNumber
source · pub struct PageNumber {
bits: usize,
}
Fields§
§bits: usize
Implementations§
source§impl PageNumber
impl PageNumber
pub fn index(&self) -> [usize; 3]
pub fn offset(&mut self, rhs: usize) -> Self
sourcepub fn as_trap_context_mut(&self) -> &'static mut TrapContext
pub fn as_trap_context_mut(&self) -> &'static mut TrapContext
Interprets the page as a TrapContext and return a mutable reference to it.
Trait Implementations§
source§impl Clone for PageNumber
impl Clone for PageNumber
source§fn clone(&self) -> PageNumber
fn clone(&self) -> PageNumber
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 From<PageNumber> for VirtualAddress
impl From<PageNumber> for VirtualAddress
source§fn from(value: PageNumber) -> Self
fn from(value: PageNumber) -> Self
Converts to this type from the input type.
source§impl From<PageNumber> for usize
impl From<PageNumber> for usize
source§fn from(value: PageNumber) -> Self
fn from(value: PageNumber) -> Self
Converts to this type from the input type.
source§impl From<VirtualAddress> for PageNumber
impl From<VirtualAddress> for PageNumber
source§fn from(value: VirtualAddress) -> Self
fn from(value: VirtualAddress) -> Self
Converts to this type from the input type.
source§impl From<usize> for PageNumber
impl From<usize> for PageNumber
source§impl Ord for PageNumber
impl Ord for PageNumber
source§fn cmp(&self, other: &PageNumber) -> Ordering
fn cmp(&self, other: &PageNumber) -> 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<PageNumber> for PageNumber
impl PartialEq<PageNumber> for PageNumber
source§fn eq(&self, other: &PageNumber) -> bool
fn eq(&self, other: &PageNumber) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PageNumber> for PageNumber
impl PartialOrd<PageNumber> for PageNumber
source§fn partial_cmp(&self, other: &PageNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &PageNumber) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more