pub trait PageTableEntry:
Debug
+ Sync
+ Send
+ Clone
+ Copy
+ Sized
+ 'static {
type PteConfig: Copy;
// Required methods
fn new_page(paddr: PhysAddr, config: Self::PteConfig, is_huge: bool) -> Self;
fn new_table(paddr: PhysAddr) -> Self;
fn paddr(&self, is_dir: bool) -> PhysAddr;
fn config(&self, is_dir: bool) -> Self::PteConfig;
fn present(&self) -> bool;
fn huge(&self, is_dir: bool) -> bool;
fn unused(&self) -> bool;
fn clear(&mut self);
}Required Associated Types§
Required Methods§
Sourcefn new_page(paddr: PhysAddr, config: Self::PteConfig, is_huge: bool) -> Self
fn new_page(paddr: PhysAddr, config: Self::PteConfig, is_huge: bool) -> Self
Creates a leaf or block entry.
Sourcefn new_table(paddr: PhysAddr) -> Self
fn new_table(paddr: PhysAddr) -> Self
Creates an entry that points to a child page-table frame.
Sourcefn paddr(&self, is_dir: bool) -> PhysAddr
fn paddr(&self, is_dir: bool) -> PhysAddr
Returns the physical address encoded by this entry.
is_dir lets formats with level-dependent layouts decode the address
without exposing those layout rules to the generic walker.
Sourcefn config(&self, is_dir: bool) -> Self::PteConfig
fn config(&self, is_dir: bool) -> Self::PteConfig
Decodes the owner-defined leaf configuration.
Sourcefn present(&self) -> bool
fn present(&self) -> bool
Returns whether this entry participates in address translation.
Implementations must recognize both leaf mappings and child-table entries.
Sourcefn huge(&self, is_dir: bool) -> bool
fn huge(&self, is_dir: bool) -> bool
Returns whether this entry is a block mapping at the current level.
Sourcefn unused(&self) -> bool
fn unused(&self) -> bool
Returns whether this entry contains no descriptor state at all.
This is distinct from Self::present: a non-present leaf may retain its
physical address so that a later protection change can activate it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".