Struct x86_64::structures::paging::page_table::PageTableIndex
source · pub struct PageTableIndex(/* private fields */);
Expand description
A 9-bit index into a page table.
Can be used to select one of the 512 entries of a page table.
Guaranteed to only ever contain 0..512.
Implementations§
source§impl PageTableIndex
impl PageTableIndex
sourcepub fn new(index: u16) -> Self
pub fn new(index: u16) -> Self
Creates a new index from the given u16
. Panics if the given value is >=512.
sourcepub const fn new_truncate(index: u16) -> Self
pub const fn new_truncate(index: u16) -> Self
Creates a new index from the given u16
. Throws away bits if the value is >=512.
Trait Implementations§
source§impl Clone for PageTableIndex
impl Clone for PageTableIndex
source§fn clone(&self) -> PageTableIndex
fn clone(&self) -> PageTableIndex
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PageTableIndex
impl Debug for PageTableIndex
source§impl From<PageTableIndex> for u16
impl From<PageTableIndex> for u16
source§fn from(index: PageTableIndex) -> Self
fn from(index: PageTableIndex) -> Self
Converts to this type from the input type.
source§impl From<PageTableIndex> for u32
impl From<PageTableIndex> for u32
source§fn from(index: PageTableIndex) -> Self
fn from(index: PageTableIndex) -> Self
Converts to this type from the input type.
source§impl From<PageTableIndex> for u64
impl From<PageTableIndex> for u64
source§fn from(index: PageTableIndex) -> Self
fn from(index: PageTableIndex) -> Self
Converts to this type from the input type.
source§impl From<PageTableIndex> for usize
impl From<PageTableIndex> for usize
source§fn from(index: PageTableIndex) -> Self
fn from(index: PageTableIndex) -> Self
Converts to this type from the input type.
source§impl Hash for PageTableIndex
impl Hash for PageTableIndex
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 moresource§impl Ord for PageTableIndex
impl Ord for PageTableIndex
source§impl PartialEq for PageTableIndex
impl PartialEq for PageTableIndex
source§fn eq(&self, other: &PageTableIndex) -> bool
fn eq(&self, other: &PageTableIndex) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.