pub struct PageTableEntry { /* private fields */ }
Expand description
A 64-bit page table entry.
Implementations§
Source§impl PageTableEntry
impl PageTableEntry
Sourcepub fn set_unused(&mut self)
pub fn set_unused(&mut self)
Sets this entry to zero.
Sourcepub const fn flags(&self) -> PageTableFlags
pub const fn flags(&self) -> PageTableFlags
Returns the flags of this entry.
Sourcepub fn addr(&self) -> PhysAddr
pub fn addr(&self) -> PhysAddr
Returns the physical address mapped by this entry, might be zero.
Sourcepub fn frame(&self) -> Result<PhysFrame, FrameError>
pub fn frame(&self) -> Result<PhysFrame, FrameError>
Returns the physical frame mapped by this entry.
Returns the following errors:
FrameError::FrameNotPresent
if the entry doesn’t have thePRESENT
flag set.FrameError::HugeFrame
if the entry has theHUGE_PAGE
flag set (for huge pages theaddr
function must be used)
Sourcepub fn set_addr(&mut self, addr: PhysAddr, flags: PageTableFlags)
pub fn set_addr(&mut self, addr: PhysAddr, flags: PageTableFlags)
Map the entry to the specified physical address with the specified flags.
Sourcepub fn set_frame(&mut self, frame: PhysFrame, flags: PageTableFlags)
pub fn set_frame(&mut self, frame: PhysFrame, flags: PageTableFlags)
Map the entry to the specified physical frame with the specified flags.
Sourcepub fn set_flags(&mut self, flags: PageTableFlags)
pub fn set_flags(&mut self, flags: PageTableFlags)
Sets the flags of this entry.
Trait Implementations§
Source§impl Clone for PageTableEntry
impl Clone for PageTableEntry
Source§fn clone(&self) -> PageTableEntry
fn clone(&self) -> PageTableEntry
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 moreAuto Trait Implementations§
impl Freeze for PageTableEntry
impl RefUnwindSafe for PageTableEntry
impl Send for PageTableEntry
impl Sync for PageTableEntry
impl Unpin for PageTableEntry
impl UnwindSafe for PageTableEntry
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