Struct x86_64::structures::paging::page_table::PageOffset [−][src]
pub struct PageOffset(_);
A 12-bit offset into a 4KiB Page.
This type is returned by the VirtAddr::page_offset
method.
Guaranteed to only ever contain 0..4096.
Implementations
impl PageOffset
[src]
impl PageOffset
[src]pub fn new(offset: u16) -> Self
[src]
pub fn new(offset: u16) -> Self
[src]Creates a new offset from the given u16
. Panics if the passed value is >=4096.
pub const fn new_truncate(offset: u16) -> Self
[src]
pub const fn new_truncate(offset: u16) -> Self
[src]Creates a new offset from the given u16
. Throws away bits if the value is >=4096.
Trait Implementations
impl Clone for PageOffset
[src]
impl Clone for PageOffset
[src]fn clone(&self) -> PageOffset
[src]
fn clone(&self) -> PageOffset
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for PageOffset
[src]
impl Debug for PageOffset
[src]impl Ord for PageOffset
[src]
impl Ord for PageOffset
[src]impl PartialEq<PageOffset> for PageOffset
[src]
impl PartialEq<PageOffset> for PageOffset
[src]fn eq(&self, other: &PageOffset) -> bool
[src]
fn eq(&self, other: &PageOffset) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &PageOffset) -> bool
[src]
fn ne(&self, other: &PageOffset) -> bool
[src]This method tests for !=
.
impl PartialOrd<PageOffset> for PageOffset
[src]
impl PartialOrd<PageOffset> for PageOffset
[src]fn partial_cmp(&self, other: &PageOffset) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &PageOffset) -> 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