Skip to main content

PageTableEntry

Trait PageTableEntry 

Source
pub trait PageTableEntry:
    Debug
    + Sync
    + Send
    + Clone
    + Copy
    + Sized
    + 'static {
    // Required methods
    fn from_config(config: PteConfig) -> Self;
    fn to_config(&self, is_dir: bool) -> PteConfig;
    fn valid(&self) -> bool;
}

Required Methods§

Source

fn from_config(config: PteConfig) -> Self

从 PteConfig 创建页表项

§参数
  • config: 包含所有页表项配置的结构
§返回

新的页表项实例

Source

fn to_config(&self, is_dir: bool) -> PteConfig

将页表项转换为 PteConfig

§参数
  • is_dir: 是否为目录项(影响物理地址布局解析)
    • true: 目录项(可能包含大页映射或子页表指针)
    • false: 页表项(叶子级别,基本页映射)
§返回

包含当前页表项所有状态的 PteConfig

Source

fn valid(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§