[][src]Struct x86_64::PhysAddr

#[repr(transparent)]
pub struct PhysAddr(_);

A 64-bit physical memory address.

This is a wrapper type around an u64, so it is always 8 bytes, even when compiled on non 64-bit systems. The UsizeConversions trait can be used for performing conversions between u64 and usize.

On x86_64, only the 52 lower bits of a physical address can be used. The top 12 bits need to be zero. This type guarantees that it always represents a valid physical address.

Methods

impl PhysAddr
[src]

Creates a new physical address.

Panics if a bit in the range 52 to 64 is set.

Tries to create a new physical address.

Fails if any bits in the range 52 to 64 are set.

Converts the address to an u64.

Convenience method for checking if a physical address is null.

Aligns the physical address upwards to the given alignment.

See the align_up function for more information.

Aligns the physical address downwards to the given alignment.

See the align_down function for more information.

Checks whether the physical address has the demanded alignment.

Trait Implementations

impl Debug for PhysAddr
[src]

Formats the value using the given formatter. Read more

impl Sub<u64> for PhysAddr
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Sub<usize> for PhysAddr where
    u64: FromUsize
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Sub<PhysAddr> for PhysAddr
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl PartialEq<PhysAddr> for PhysAddr
[src]

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

This method tests for !=.

impl Eq for PhysAddr
[src]

impl Ord for PhysAddr
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd<PhysAddr> for PhysAddr
[src]

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

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

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

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

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

impl Add<u64> for PhysAddr
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Add<usize> for PhysAddr where
    u64: FromUsize
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl AddAssign<u64> for PhysAddr
[src]

Performs the += operation.

impl AddAssign<usize> for PhysAddr where
    u64: FromUsize
[src]

Performs the += operation.

impl SubAssign<u64> for PhysAddr
[src]

Performs the -= operation.

impl SubAssign<usize> for PhysAddr where
    u64: FromUsize
[src]

Performs the -= operation.

impl Copy for PhysAddr
[src]

impl Octal for PhysAddr
[src]

Formats the value using the given formatter.

impl Binary for PhysAddr
[src]

Formats the value using the given formatter.

impl LowerHex for PhysAddr
[src]

Formats the value using the given formatter.

impl UpperHex for PhysAddr
[src]

Formats the value using the given formatter.

impl Clone for PhysAddr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for PhysAddr

impl Sync for PhysAddr

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more