pub struct PhysicalPageNumber(pub usize);Expand description
物理页号
Tuple Fields§
§0: usizeImplementations§
Source§impl PhysicalPageNumber
impl PhysicalPageNumber
Sourcepub fn get_mut<T>(&self) -> &'static mut T
pub fn get_mut<T>(&self) -> &'static mut T
获取物理页号所在的物理地址页的可变引用
将指向的物理地址数据视为类型 T 的可变引用
Sourcepub fn get_ref<T>(&self) -> &'static T
pub fn get_ref<T>(&self) -> &'static T
获取物理页号所在的物理地址页的引用
将指向的物理地址数据视为类型 T 的引用
Sourcepub fn get_pte_array(&self) -> &'static mut [PageTableEntry]
pub fn get_pte_array(&self) -> &'static mut [PageTableEntry]
获取物理页号所在的物理地址页的页表项数组的可变引用
将指向的物理地址数据视为页表项数组的可变引用
Sourcepub fn get_bytes_array(&self) -> &'static mut [u8]
pub fn get_bytes_array(&self) -> &'static mut [u8]
获取物理页号所在的物理地址页的字节数组的可变引用
将指向的物理地址数据视为字节数组的可变引用
Trait Implementations§
Source§impl Clone for PhysicalPageNumber
impl Clone for PhysicalPageNumber
Source§fn clone(&self) -> PhysicalPageNumber
fn clone(&self) -> PhysicalPageNumber
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 Debug for PhysicalPageNumber
impl Debug for PhysicalPageNumber
Source§impl From<&PageTableEntry> for PhysicalPageNumber
impl From<&PageTableEntry> for PhysicalPageNumber
Source§fn from(pte: &PageTableEntry) -> Self
fn from(pte: &PageTableEntry) -> Self
从页表项创建物理页号
根据页表项的位字段创建物理页号
Source§impl From<&mut PageTableEntry> for PhysicalPageNumber
impl From<&mut PageTableEntry> for PhysicalPageNumber
Source§fn from(pte: &mut PageTableEntry) -> Self
fn from(pte: &mut PageTableEntry) -> Self
从可变页表项创建物理页号
根据页表项的位字段创建物理页号
Source§impl From<PhysicalAddress> for PhysicalPageNumber
impl From<PhysicalAddress> for PhysicalPageNumber
Source§impl From<PhysicalPageNumber> for PhysicalAddress
impl From<PhysicalPageNumber> for PhysicalAddress
Source§impl From<PhysicalPageNumber> for usize
impl From<PhysicalPageNumber> for usize
Source§impl From<usize> for PhysicalPageNumber
impl From<usize> for PhysicalPageNumber
Source§impl Ord for PhysicalPageNumber
impl Ord for PhysicalPageNumber
Source§fn cmp(&self, other: &PhysicalPageNumber) -> Ordering
fn cmp(&self, other: &PhysicalPageNumber) -> 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 PhysicalPageNumber
impl PartialEq for PhysicalPageNumber
Source§impl PartialOrd for PhysicalPageNumber
impl PartialOrd for PhysicalPageNumber
impl Copy for PhysicalPageNumber
impl Eq for PhysicalPageNumber
impl StructuralPartialEq for PhysicalPageNumber
Auto Trait Implementations§
impl Freeze for PhysicalPageNumber
impl RefUnwindSafe for PhysicalPageNumber
impl Send for PhysicalPageNumber
impl Sync for PhysicalPageNumber
impl Unpin for PhysicalPageNumber
impl UnwindSafe for PhysicalPageNumber
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