Struct PageTableEntry
#[repr(transparent)]pub struct PageTableEntry {
entry: u64,
}Expand description
A 64-bit page table entry.
Fields§
§entry: u64Implementations§
§impl PageTableEntry
impl PageTableEntry
pub const fn new() -> PageTableEntry
pub const fn new() -> PageTableEntry
Creates an unused page table entry.
pub fn set_unused(&mut self)
pub fn set_unused(&mut self)
Sets this entry to zero.
pub const fn flags(&self) -> PageTableFlags
pub const fn flags(&self) -> PageTableFlags
Returns the flags of this entry.
pub 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::FrameNotPresentif the entry doesn’t have thePRESENTflag set.FrameError::HugeFrameif the entry has theHUGE_PAGEflag set (for huge pages theaddrfunction must be used)
pub 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.
pub 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.
pub fn set_flags(&mut self, flags: PageTableFlags)
pub fn set_flags(&mut self, flags: PageTableFlags)
Sets the flags of this entry.
Trait Implementations§
§impl Clone for PageTableEntry
impl Clone for PageTableEntry
§fn clone(&self) -> PageTableEntry
fn clone(&self) -> PageTableEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PageTableEntry
impl Debug for PageTableEntry
§impl Default for PageTableEntry
impl Default for PageTableEntry
§fn default() -> PageTableEntry
fn default() -> PageTableEntry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PageTableEntry
impl RefUnwindSafe for PageTableEntry
impl Send for PageTableEntry
impl Sync for PageTableEntry
impl Unpin for PageTableEntry
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more