[][src]Struct x86::bits64::paging::PAddr

#[repr(transparent)]
pub struct PAddr(pub u64);

A wrapper for a physical address.

Methods

impl PAddr[src]

pub fn as_u64(self) -> u64[src]

Convert to u64

pub fn as_usize(self) -> usize[src]

Convert to usize

pub const fn zero() -> Self[src]

Physical Address zero.

pub fn is_zero(self) -> bool[src]

Is zero?

pub fn base_page_offset(self) -> u64[src]

Offset within the 4 KiB page.

pub fn large_page_offset(self) -> u64[src]

Offset within the 2 MiB page.

pub fn huge_page_offset(self) -> u64[src]

Offset within the 1 GiB page.

pub fn align_down_to_base_page(self) -> Self[src]

Return address of nearest 4 KiB page (lower or equal than self).

pub fn align_down_to_large_page(self) -> Self[src]

Return address of nearest 2 MiB page (lower or equal than self).

pub fn align_down_to_huge_page(self) -> Self[src]

Return address of nearest 1 GiB page (lower or equal than self).

pub fn align_up_to_base_page(self) -> Self[src]

Return address of nearest 4 KiB page (higher or equal than self).

pub fn align_up_to_large_page(self) -> Self[src]

Return address of nearest 2 MiB page (higher or equal than self).

pub fn align_up_to_huge_page(self) -> Self[src]

Return address of nearest 1 GiB page (higher or equal than self).

pub fn is_base_page_aligned(self) -> bool[src]

Is this address aligned to a 4 KiB page?

pub fn is_large_page_aligned(self) -> bool[src]

Is this address aligned to a 2 MiB page?

pub fn is_huge_page_aligned(self) -> bool[src]

Is this address aligned to a 1 GiB page?

pub fn is_aligned<U>(self, align: U) -> bool where
    U: Into<u64> + Copy
[src]

Is this address aligned to align?

Note

align must be a power of two.

Trait Implementations

impl From<u64> for PAddr[src]

impl From<usize> for PAddr[src]

impl From<i32> for PAddr[src]

impl PartialEq<PAddr> for PAddr[src]

impl Eq for PAddr[src]

impl Ord for PAddr[src]

impl PartialOrd<PAddr> for PAddr[src]

impl Add<PAddr> for PAddr[src]

type Output = PAddr

The resulting type after applying the + operator.

impl Add<u64> for PAddr[src]

type Output = PAddr

The resulting type after applying the + operator.

impl Add<usize> for PAddr[src]

type Output = PAddr

The resulting type after applying the + operator.

impl Sub<PAddr> for PAddr[src]

type Output = PAddr

The resulting type after applying the - operator.

impl Sub<u64> for PAddr[src]

type Output = PAddr

The resulting type after applying the - operator.

impl Sub<usize> for PAddr[src]

type Output = PAddr

The resulting type after applying the - operator.

impl Rem<PAddr> for PAddr[src]

type Output = PAddr

The resulting type after applying the % operator.

impl Rem<u64> for PAddr[src]

type Output = u64

The resulting type after applying the % operator.

impl Rem<usize> for PAddr[src]

type Output = u64

The resulting type after applying the % operator.

impl AddAssign<PAddr> for PAddr[src]

impl AddAssign<u64> for PAddr[src]

impl BitAnd<PAddr> for PAddr[src]

type Output = Self

The resulting type after applying the & operator.

impl BitAnd<u64> for PAddr[src]

type Output = u64

The resulting type after applying the & operator.

impl BitOr<PAddr> for PAddr[src]

type Output = PAddr

The resulting type after applying the | operator.

impl BitOr<u64> for PAddr[src]

type Output = u64

The resulting type after applying the | operator.

impl Shr<u64> for PAddr[src]

type Output = u64

The resulting type after applying the >> operator.

impl Debug for PAddr[src]

impl Display for PAddr[src]

impl Into<u64> for PAddr[src]

impl Into<usize> for PAddr[src]

impl Octal for PAddr[src]

impl Binary for PAddr[src]

impl LowerHex for PAddr[src]

impl UpperHex for PAddr[src]

impl Pointer for PAddr[src]

impl Copy for PAddr[src]

impl Clone for PAddr[src]

Auto Trait Implementations

impl Unpin for PAddr

impl Send for PAddr

impl Sync for PAddr

Blanket Implementations

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

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.

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

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.

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

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

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