Struct kernel::mem::address::frame_number::FrameNumber
source · pub struct FrameNumber {
pub bits: usize,
}
Expand description
The FrameNumber
struct represents the number of a 44-bit page frame defined in the Sv39
page table format.
Fields§
§bits: usize
Implementations§
source§impl FrameNumber
impl FrameNumber
sourcepub fn as_bytes(&self) -> &'static [u8]
pub fn as_bytes(&self) -> &'static [u8]
Interprets the frame as a slice of u8
and return a reference to the slice.
sourcepub fn as_bytes_mut(&self) -> &'static mut [u8]
pub fn as_bytes_mut(&self) -> &'static mut [u8]
Interprets the frame as a slice of u8
and return a mutable reference to the slice.
sourcepub fn as_pte(&self) -> &'static [PageTableEntry]
pub fn as_pte(&self) -> &'static [PageTableEntry]
Interprets the frame as a slice of PageTableEntry and return a reference to the slice.
sourcepub fn as_pte_mut(&self) -> &'static mut [PageTableEntry]
pub fn as_pte_mut(&self) -> &'static mut [PageTableEntry]
Interprets the frame as a slice of PageTableEntry and return a mutable reference to the slice.
sourcepub fn as_trap_context_mut(&self) -> &'static mut TrapContext
pub fn as_trap_context_mut(&self) -> &'static mut TrapContext
Interprets the frame as a TrapContext and return a mutable reference to it.
Trait Implementations§
source§impl Add<usize> for FrameNumber
impl Add<usize> for FrameNumber
source§impl AddAssign<usize> for FrameNumber
impl AddAssign<usize> for FrameNumber
source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+=
operation. Read moresource§impl Clone for FrameNumber
impl Clone for FrameNumber
source§fn clone(&self) -> FrameNumber
fn clone(&self) -> FrameNumber
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<FrameNumber> for PhysicalAddress
impl From<FrameNumber> for PhysicalAddress
source§fn from(value: FrameNumber) -> Self
fn from(value: FrameNumber) -> Self
Converts to this type from the input type.
source§impl From<FrameNumber> for usize
impl From<FrameNumber> for usize
source§fn from(value: FrameNumber) -> Self
fn from(value: FrameNumber) -> Self
Converts to this type from the input type.
source§impl From<PhysicalAddress> for FrameNumber
impl From<PhysicalAddress> for FrameNumber
source§fn from(value: PhysicalAddress) -> Self
fn from(value: PhysicalAddress) -> Self
Converts to this type from the input type.
source§impl From<usize> for FrameNumber
impl From<usize> for FrameNumber
source§impl Ord for FrameNumber
impl Ord for FrameNumber
source§fn cmp(&self, other: &FrameNumber) -> Ordering
fn cmp(&self, other: &FrameNumber) -> 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<FrameNumber> for FrameNumber
impl PartialEq<FrameNumber> for FrameNumber
source§fn eq(&self, other: &FrameNumber) -> bool
fn eq(&self, other: &FrameNumber) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<FrameNumber> for FrameNumber
impl PartialOrd<FrameNumber> for FrameNumber
source§fn partial_cmp(&self, other: &FrameNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &FrameNumber) -> 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