#[repr(C)]pub union PdEntry {
    bits: u64,
    entry: Pde,
    leaf_2m: Pde2M,
}Expand description
L2 PDE union — overlays non-leaf Pde and leaf Pde2M
on the same 64-bit storage.
Prefer PdEntry::view for safe typed access.
These check the PS bit and hand you the correct variant.
Fields§
§bits: u64Raw 64-bit storage of the entry.
entry: PdeNon-leaf form: next-level Page Table (PS=0).
leaf_2m: Pde2MLeaf form: 2 MiB mapping (PS=1).
Implementations§
Source§impl PdEntry
 
impl PdEntry
pub const fn new() -> Self
pub const fn new_entry(entry: Pde) -> Self
pub const fn new_leaf(leaf: Pde2M) -> Self
pub const fn present(self) -> bool
Sourcepub const fn view(self) -> L2View
 
pub const fn view(self) -> L2View
Typed read-only view chosen by the PS bit.
- If PS=1 → 
L2View::Leaf2M - If PS=0 → 
L2View::Entry 
Sourcepub const fn kind(self) -> Option<PdEntryKind>
 
pub const fn kind(self) -> Option<PdEntryKind>
Decode the entry into its semantic kind, or None if not present.
- When 
PS=1, returnsPdEntryKind::Leaf2MiBwith a 2 MiB page base. - When 
PS=0, returnsPdEntryKind::NextPageTablewith a PT base. 
Sourcepub const fn present_next_with(
    leaf_flags: VirtualMemoryPageBits,
    page: PhysicalPage<Size4K>,
) -> Self
 
pub const fn present_next_with( leaf_flags: VirtualMemoryPageBits, page: PhysicalPage<Size4K>, ) -> Self
Create a non-leaf PDE that points to a Page Table (PS=0).
Sets present=1, forces PS=0, and writes the PT base address.
The PT base must be 4 KiB-aligned.
Sourcepub const fn present_leaf_with(
    leaf_flags: VirtualMemoryPageBits,
    page: PhysicalPage<Size2M>,
) -> Self
 
pub const fn present_leaf_with( leaf_flags: VirtualMemoryPageBits, page: PhysicalPage<Size2M>, ) -> Self
Create a new, present PdEntry with the specified flags, at the specified page.
Trait Implementations§
impl Copy for PdEntry
Auto Trait Implementations§
impl Freeze for PdEntry
impl RefUnwindSafe for PdEntry
impl Send for PdEntry
impl Sync for PdEntry
impl Unpin for PdEntry
impl UnwindSafe for PdEntry
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