# PTE in riscv::paging - Rust
API documentation for the Rust `PTE` trait in crate `riscv`.
Keywords: rust, rustlang, rust-lang, PTE

# Trait riscv::paging::PTE

source · [−]

    pub trait PTE {
        fn is_unused(&self) -> bool;
        fn set_unused(&mut self);
        fn flags(&self) -> PageTableFlags;
        fn ppn(&self) -> usize;
        fn ppn_u64(&self) -> u64;
        fn addr<T: PhysicalAddress>(&self) -> T;
        fn frame<T: PhysicalAddress>(&self) -> FrameWith<T>;
        fn set<T: PhysicalAddress>(
            &mut self,
            frame: FrameWith<T>,
            flags: PageTableFlags
        );
        fn flags_mut(&mut self) -> &mut PageTableFlags;
    }

## Required methods

source

#### fn is_unused(&self) -> bool

source

#### fn set_unused(&mut self)

source

#### fn flags(&self) -> PageTableFlags

source

#### fn ppn(&self) -> usize

source

#### fn ppn_u64(&self) -> u64

source

#### fn addr<T: PhysicalAddress>(&self) -> T

source

#### fn frame<T: PhysicalAddress>(&self) -> FrameWith<T>

source

#### fn set<T: PhysicalAddress>(
&mut self,
frame: FrameWith<T>,
flags: PageTableFlags
)

source

#### fn flags_mut(&mut self) -> &mut PageTableFlags

## Implementors

source

### impl PTE for PageTableEntryX32

source

### impl PTE for PageTableEntryX64