Struct x86_64::structures::paging::page::Page [−][src]
Expand description
A virtual memory page.
Implementations
impl<S: PageSize> Page<S>
[src]
impl<S: PageSize> Page<S>
[src]pub fn from_start_address(address: VirtAddr) -> Result<Self, AddressNotAligned>
[src]
pub fn from_start_address(address: VirtAddr) -> Result<Self, AddressNotAligned>
[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 const unsafe fn from_start_address_unchecked(
start_address: VirtAddr
) -> Self
[src]
pub const unsafe fn from_start_address_unchecked(
start_address: VirtAddr
) -> Self
[src]Returns the page that starts at the given virtual address.
Safety
The address must be correctly aligned.
pub fn containing_address(address: VirtAddr) -> Self
[src]
pub fn containing_address(address: VirtAddr) -> Self
[src]Returns the page that contains the given virtual address.
pub const fn start_address(self) -> VirtAddr
[src]
pub const fn start_address(self) -> VirtAddr
[src]Returns the start address of the page.
pub const fn p4_index(self) -> PageTableIndex
[src]
pub const fn p4_index(self) -> PageTableIndex
[src]Returns the level 4 page table index of this page.
pub const fn p3_index(self) -> PageTableIndex
[src]
pub const fn p3_index(self) -> PageTableIndex
[src]Returns the level 3 page table index of this page.
pub const fn range(start: Self, end: Self) -> PageRange<S>ⓘ
[src]
pub const fn range(start: Self, end: Self) -> PageRange<S>ⓘ
[src]Returns a range of pages, exclusive end
.
pub const fn range_inclusive(start: Self, end: Self) -> PageRangeInclusive<S>ⓘNotable traits for PageRangeInclusive<S>
impl<S: PageSize> Iterator for PageRangeInclusive<S> type Item = Page<S>;
[src]
pub const fn range_inclusive(start: Self, end: Self) -> PageRangeInclusive<S>ⓘNotable traits for PageRangeInclusive<S>
impl<S: PageSize> Iterator for PageRangeInclusive<S> type Item = Page<S>;
[src]Returns a range of pages, inclusive end
.
impl<S: NotGiantPageSize> Page<S>
[src]
impl<S: NotGiantPageSize> Page<S>
[src]pub const fn p2_index(self) -> PageTableIndex
[src]
pub const fn p2_index(self) -> PageTableIndex
[src]Returns the level 2 page table index of this page.
impl Page<Size1GiB>
[src]
impl Page<Size1GiB>
[src]pub fn from_page_table_indices_1gib(
p4_index: PageTableIndex,
p3_index: PageTableIndex
) -> Self
[src]
pub fn from_page_table_indices_1gib(
p4_index: PageTableIndex,
p3_index: PageTableIndex
) -> Self
[src]Returns the 1GiB memory page with the specified page table indices.
impl Page<Size2MiB>
[src]
impl Page<Size2MiB>
[src]pub fn from_page_table_indices_2mib(
p4_index: PageTableIndex,
p3_index: PageTableIndex,
p2_index: PageTableIndex
) -> Self
[src]
pub fn from_page_table_indices_2mib(
p4_index: PageTableIndex,
p3_index: PageTableIndex,
p2_index: PageTableIndex
) -> Self
[src]Returns the 2MiB memory page with the specified page table indices.
impl Page<Size4KiB>
[src]
impl Page<Size4KiB>
[src]pub fn from_page_table_indices(
p4_index: PageTableIndex,
p3_index: PageTableIndex,
p2_index: PageTableIndex,
p1_index: PageTableIndex
) -> Self
[src]
pub fn from_page_table_indices(
p4_index: PageTableIndex,
p3_index: PageTableIndex,
p2_index: PageTableIndex,
p1_index: PageTableIndex
) -> Self
[src]Returns the 4KiB memory page with the specified page table indices.
pub const fn p1_index(self) -> PageTableIndex
[src]
pub const fn p1_index(self) -> PageTableIndex
[src]Returns the level 1 page table index of this page.
Trait Implementations
impl<S: PageSize> AddAssign<u64> for Page<S>
[src]
impl<S: PageSize> AddAssign<u64> for Page<S>
[src]fn add_assign(&mut self, rhs: u64)
[src]
fn add_assign(&mut self, rhs: u64)
[src]Performs the +=
operation. Read more
impl<S: Ord + PageSize> Ord for Page<S>
[src]
impl<S: Ord + PageSize> Ord for Page<S>
[src]impl<S: PartialOrd + PageSize> PartialOrd<Page<S>> for Page<S>
[src]
impl<S: PartialOrd + PageSize> PartialOrd<Page<S>> for Page<S>
[src]fn partial_cmp(&self, other: &Page<S>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Page<S>) -> 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]
#[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]
#[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
impl<S: PageSize> SubAssign<u64> for Page<S>
[src]
impl<S: PageSize> SubAssign<u64> for Page<S>
[src]fn sub_assign(&mut self, rhs: u64)
[src]
fn sub_assign(&mut self, rhs: u64)
[src]Performs the -=
operation. Read more
impl<S: Copy + PageSize> Copy for Page<S>
[src]
impl<S: Eq + PageSize> Eq for Page<S>
[src]
impl<S: PageSize> StructuralEq for Page<S>
[src]
impl<S: PageSize> StructuralPartialEq for Page<S>
[src]
Auto Trait Implementations
impl<S> Send for Page<S> where
S: Send,
S: Send,
impl<S> Sync for Page<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Page<S> where
S: Unpin,
S: Unpin,