Struct x86_64::structures::paging::page_table::PageTableIndex[][src]

pub struct PageTableIndex(_);
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

impl PageTableIndex[src]

pub fn new(index: u16) -> Self[src]

Creates a new index from the given u16. Panics if the given value is >=512.

pub const fn new_truncate(index: u16) -> Self[src]

Creates a new index from the given u16. Throws away bits if the value is >=512.

Trait Implementations

impl Clone for PageTableIndex[src]

fn clone(&self) -> PageTableIndex[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for PageTableIndex[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Index<PageTableIndex> for PageTable[src]

type Output = PageTableEntry

The returned type after indexing.

fn index(&self, index: PageTableIndex) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl IndexMut<PageTableIndex> for PageTable[src]

fn index_mut(&mut self, index: PageTableIndex) -> &mut Self::Output[src]

Performs the mutable indexing (container[index]) operation. Read more

impl Ord for PageTableIndex[src]

fn cmp(&self, other: &PageTableIndex) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<PageTableIndex> for PageTableIndex[src]

fn eq(&self, other: &PageTableIndex) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &PageTableIndex) -> bool[src]

This method tests for !=.

impl PartialOrd<PageTableIndex> for PageTableIndex[src]

fn partial_cmp(&self, other: &PageTableIndex) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Copy for PageTableIndex[src]

impl Eq for PageTableIndex[src]

impl StructuralEq for PageTableIndex[src]

impl StructuralPartialEq for PageTableIndex[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.