Struct x86_64::structures::paging::frame::PhysFrame[][src]

#[repr(C)]
pub struct PhysFrame<S: PageSize = Size4KiB> { /* fields omitted */ }
Expand description

A physical memory frame.

Implementations

impl<S: PageSize> PhysFrame<S>[src]

pub fn from_start_address(address: PhysAddr) -> Result<Self, AddressNotAligned>[src]

Returns the frame that starts at the given virtual address.

Returns an error if the address is not correctly aligned (i.e. is not a valid frame start).

pub const unsafe fn from_start_address_unchecked(
    start_address: PhysAddr
) -> Self
[src]

Returns the frame that starts at the given virtual address.

Safety

The address must be correctly aligned.

pub fn containing_address(address: PhysAddr) -> Self[src]

Returns the frame that contains the given physical address.

pub const fn start_address(self) -> PhysAddr[src]

Returns the start address of the frame.

pub const fn size(self) -> u64[src]

Returns the size the frame (4KB, 2MB or 1GB).

pub const fn range(start: PhysFrame<S>, end: PhysFrame<S>) -> PhysFrameRange<S>

Notable traits for PhysFrameRange<S>

impl<S: PageSize> Iterator for PhysFrameRange<S> type Item = PhysFrame<S>;
[src]

Returns a range of frames, exclusive end.

pub const fn range_inclusive(
    start: PhysFrame<S>,
    end: PhysFrame<S>
) -> PhysFrameRangeInclusive<S>

Notable traits for PhysFrameRangeInclusive<S>

impl<S: PageSize> Iterator for PhysFrameRangeInclusive<S> type Item = PhysFrame<S>;
[src]

Returns a range of frames, inclusive end.

Trait Implementations

impl<S: PageSize> Add<u64> for PhysFrame<S>[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: u64) -> Self::Output[src]

Performs the + operation. Read more

impl<S: PageSize> AddAssign<u64> for PhysFrame<S>[src]

fn add_assign(&mut self, rhs: u64)[src]

Performs the += operation. Read more

impl<S: Clone + PageSize> Clone for PhysFrame<S>[src]

fn clone(&self) -> PhysFrame<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: PageSize> Debug for PhysFrame<S>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<S: Ord + PageSize> Ord for PhysFrame<S>[src]

fn cmp(&self, other: &PhysFrame<S>) -> Ordering[src]

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

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl<S: PartialEq + PageSize> PartialEq<PhysFrame<S>> for PhysFrame<S>[src]

fn eq(&self, other: &PhysFrame<S>) -> bool[src]

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

fn ne(&self, other: &PhysFrame<S>) -> bool[src]

This method tests for !=.

impl<S: PartialOrd + PageSize> PartialOrd<PhysFrame<S>> for PhysFrame<S>[src]

fn partial_cmp(&self, other: &PhysFrame<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]

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]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<S: PageSize> Sub<PhysFrame<S>> for PhysFrame<S>[src]

type Output = u64

The resulting type after applying the - operator.

fn sub(self, rhs: PhysFrame<S>) -> Self::Output[src]

Performs the - operation. Read more

impl<S: PageSize> Sub<u64> for PhysFrame<S>[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: u64) -> Self::Output[src]

Performs the - operation. Read more

impl<S: PageSize> SubAssign<u64> for PhysFrame<S>[src]

fn sub_assign(&mut self, rhs: u64)[src]

Performs the -= operation. Read more

impl<S: Copy + PageSize> Copy for PhysFrame<S>[src]

impl<S: Eq + PageSize> Eq for PhysFrame<S>[src]

impl<S: PageSize> StructuralEq for PhysFrame<S>[src]

impl<S: PageSize> StructuralPartialEq for PhysFrame<S>[src]

Auto Trait Implementations

impl<S> Send for PhysFrame<S> where
    S: Send

impl<S> Sync for PhysFrame<S> where
    S: Sync

impl<S> Unpin for PhysFrame<S> where
    S: Unpin

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.