Struct x86_64::structures::paging::Page
[−]
[src]
#[repr(C)]pub struct Page<S: PageSize = Size4KB> { /* fields omitted */ }
Methods
impl<S: PageSize> Page<S>
[src]
pub fn from_start_address(address: VirtAddr) -> Result<Self, ()>
[src]
Returns the page that starts at the given virtual address.
Returns an error if the address is not correctly aligned (i.e. is not a valid page start).
pub fn containing_address(address: VirtAddr) -> Self
[src]
Returns the page that contains the given virtual address.
pub fn start_address(&self) -> VirtAddr
[src]
Returns the start address of the page.
pub const fn size(&self) -> u64
[src]
Returns the size the page (4KB, 2MB or 1GB).
pub fn p4_index(&self) -> u9
[src]
Returns the level 4 page table index of this page.
pub fn p3_index(&self) -> u9
[src]
Returns the level 3 page table index of this page.
ⓘImportant traits for PageRange<S>pub fn range(start: Self, end: Self) -> PageRange<S>
[src]
ⓘImportant traits for PageRangeInclusive<S>pub fn range_inclusive(start: Self, end: Self) -> PageRangeInclusive<S>
[src]
impl<S: NotGiantPageSize> Page<S>
[src]
impl Page<Size1GB>
[src]
pub fn from_page_table_indices_1gb(p4_index: u9, p3_index: u9) -> Self
[src]
impl Page<Size2MB>
[src]
pub fn from_page_table_indices_2mb(
p4_index: u9,
p3_index: u9,
p2_index: u9
) -> Self
[src]
p4_index: u9,
p3_index: u9,
p2_index: u9
) -> Self
impl Page<Size4KB>
[src]
pub fn from_page_table_indices(
p4_index: u9,
p3_index: u9,
p2_index: u9,
p1_index: u9
) -> Self
[src]
p4_index: u9,
p3_index: u9,
p2_index: u9,
p1_index: u9
) -> Self
pub fn p1_index(&self) -> u9
[src]
Returns the level 1 page table index of this page.
Trait Implementations
impl<S: Clone + PageSize> Clone for Page<S>
[src]
fn clone(&self) -> Page<S>
[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<S: Copy + PageSize> Copy for Page<S>
[src]
impl<S: PartialEq + PageSize> PartialEq for Page<S>
[src]
fn eq(&self, __arg_0: &Page<S>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Page<S>) -> bool
[src]
This method tests for !=
.
impl<S: Eq + PageSize> Eq for Page<S>
[src]
impl<S: PartialOrd + PageSize> PartialOrd for Page<S>
[src]
fn partial_cmp(&self, __arg_0: &Page<S>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Page<S>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Page<S>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Page<S>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Page<S>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<S: Ord + PageSize> Ord for Page<S>
[src]
fn cmp(&self, __arg_0: &Page<S>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<S: PageSize> Debug for Page<S>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<S: PageSize> Add<u64> for Page<S>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> Self::Output
[src]
Performs the +
operation.
impl<S: PageSize> AddAssign<u64> for Page<S>
[src]
fn add_assign(&mut self, rhs: u64)
[src]
Performs the +=
operation.
impl<S: PageSize> Sub<u64> for Page<S>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: u64) -> Self::Output
[src]
Performs the -
operation.
impl<S: PageSize> SubAssign<u64> for Page<S>
[src]
fn sub_assign(&mut self, rhs: u64)
[src]
Performs the -=
operation.