Struct x86_64::structures::paging::page_table::PageTable
source · #[repr(C, align(4096))]pub struct PageTable { /* private fields */ }
Expand description
Represents a page table.
Always page-sized.
This struct implements the Index
and IndexMut
traits, so the entries can be accessed
through index operations. For example, page_table[15]
returns the 16th page table entry.
Note that while this type implements [Clone
], the users must be careful not to introduce
mutable aliasing by using the cloned page tables.
Implementations§
source§impl PageTable
impl PageTable
sourcepub fn iter(&self) -> impl Iterator<Item = &PageTableEntry>
pub fn iter(&self) -> impl Iterator<Item = &PageTableEntry>
Returns an iterator over the entries of the page table.
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut PageTableEntry>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut PageTableEntry>
Returns an iterator that allows modifying the entries of the page table.
Trait Implementations§
source§impl Index<PageTableIndex> for PageTable
impl Index<PageTableIndex> for PageTable
§type Output = PageTableEntry
type Output = PageTableEntry
The returned type after indexing.
source§fn index(&self, index: PageTableIndex) -> &Self::Output
fn index(&self, index: PageTableIndex) -> &Self::Output
Performs the indexing (
container[index]
) operation. Read moresource§impl IndexMut<PageTableIndex> for PageTable
impl IndexMut<PageTableIndex> for PageTable
source§fn index_mut(&mut self, index: PageTableIndex) -> &mut Self::Output
fn index_mut(&mut self, index: PageTableIndex) -> &mut Self::Output
Performs the mutable indexing (
container[index]
) operation. Read more