pub struct PageTableIndex(/* private fields */);Available on x86-64 only.
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 const fn new(index: u16) -> PageTableIndex
pub const fn new(index: u16) -> PageTableIndex
Creates a new index from the given u16. Panics if the given value is >=512.
Sourcepub const fn new_truncate(index: u16) -> PageTableIndex
pub const fn new_truncate(index: u16) -> PageTableIndex
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 duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PageTableIndex
Source§impl Debug for PageTableIndex
impl Debug for PageTableIndex
impl Eq for PageTableIndex
Source§impl Hash for PageTableIndex
impl Hash for PageTableIndex
Source§impl Ord for PageTableIndex
impl Ord for PageTableIndex
Source§fn cmp(&self, other: &PageTableIndex) -> Ordering
fn cmp(&self, other: &PageTableIndex) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PageTableIndex
impl PartialEq for PageTableIndex
Source§impl PartialOrd for PageTableIndex
impl PartialOrd for PageTableIndex
impl StructuralPartialEq for PageTableIndex
Auto Trait Implementations§
impl Freeze for PageTableIndex
impl RefUnwindSafe for PageTableIndex
impl Send for PageTableIndex
impl Sync for PageTableIndex
impl Unpin for PageTableIndex
impl UnsafeUnpin for PageTableIndex
impl UnwindSafe for PageTableIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more