Expand description
A physical memory frame.
Implementations
sourceimpl<S: PageSize> PhysFrame<S>
impl<S: PageSize> PhysFrame<S>
sourcepub fn from_start_address(address: PhysAddr) -> Result<Self, AddressNotAligned>
pub fn from_start_address(address: PhysAddr) -> Result<Self, AddressNotAligned>
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).
sourcepub const unsafe fn from_start_address_unchecked(
start_address: PhysAddr
) -> Self
pub const unsafe fn from_start_address_unchecked(
start_address: PhysAddr
) -> Self
Returns the frame that starts at the given virtual address.
Safety
The address must be correctly aligned.
sourcepub fn containing_address(address: PhysAddr) -> Self
pub fn containing_address(address: PhysAddr) -> Self
Returns the frame that contains the given physical address.
sourcepub const fn start_address(self) -> PhysAddr
pub const fn start_address(self) -> PhysAddr
Returns the start address of the frame.
sourcepub 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>;
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>;
Returns a range of frames, exclusive end
.
sourcepub 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>;
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>;
Returns a range of frames, inclusive end
.
Trait Implementations
sourceimpl<S: PageSize> AddAssign<u64> for PhysFrame<S>
impl<S: PageSize> AddAssign<u64> for PhysFrame<S>
sourcefn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
Performs the +=
operation. Read more
sourceimpl<S: Ord + PageSize> Ord for PhysFrame<S>
impl<S: Ord + PageSize> Ord for PhysFrame<S>
sourceimpl<S: PartialOrd + PageSize> PartialOrd<PhysFrame<S>> for PhysFrame<S>
impl<S: PartialOrd + PageSize> PartialOrd<PhysFrame<S>> for PhysFrame<S>
sourcefn partial_cmp(&self, other: &PhysFrame<S>) -> Option<Ordering>
fn partial_cmp(&self, other: &PhysFrame<S>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: PageSize> SubAssign<u64> for PhysFrame<S>
impl<S: PageSize> SubAssign<u64> for PhysFrame<S>
sourcefn sub_assign(&mut self, rhs: u64)
fn sub_assign(&mut self, rhs: u64)
Performs the -=
operation. Read more
impl<S: Copy + PageSize> Copy for PhysFrame<S>
impl<S: Eq + PageSize> Eq for PhysFrame<S>
impl<S: PageSize> StructuralEq for PhysFrame<S>
impl<S: PageSize> StructuralPartialEq for PhysFrame<S>
Auto Trait Implementations
impl<S> RefUnwindSafe for PhysFrame<S> where
S: RefUnwindSafe,
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,
impl<S> UnwindSafe for PhysFrame<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more