#[repr(transparent)]pub struct Frame {
base: PhysicalAddress<PAGE_SIZE>,
}
Expand description
A memory frame
Fields§
§base: PhysicalAddress<PAGE_SIZE>
Implementations§
Source§impl Frame
impl Frame
Sourcepub const fn to_page(&self) -> Page
🔬This is a nightly-only experimental API. (kernel_physical_page_offset
#1)
pub const fn to_page(&self) -> Page
kernel_physical_page_offset
#1)Sourcepub const fn zero() -> Frame
🔬This is a nightly-only experimental API. (kernel_frame_zero
)
pub const fn zero() -> Frame
kernel_frame_zero
)Returns the zero frame
1.0.0 (const: 1.0.0) · Sourcepub const fn new(base: PhysicalAddress<PAGE_SIZE>) -> Self
pub const fn new(base: PhysicalAddress<PAGE_SIZE>) -> Self
Creates a Frame
using base
as the first address within it
1.0.0 (const: 1.0.0) · Sourcepub const fn checked_sub(&self, rhs: usize) -> Option<Self>
pub const fn checked_sub(&self, rhs: usize) -> Option<Self>
Attempts to subtract rhs
number of pages, returning None
if overflow would occur
1.0.0 (const: 1.0.0) · Sourcepub const fn start(&self) -> PhysicalAddress<PAGE_SIZE>
pub const fn start(&self) -> PhysicalAddress<PAGE_SIZE>
Returns the first address within the Frame
1.0.0 (const: 1.0.0) · Sourcepub const fn end(&self) -> PhysicalAddress<PAGE_SIZE>
pub const fn end(&self) -> PhysicalAddress<PAGE_SIZE>
Returns the address one after the end of the Frame
Trait Implementations§
1.0.0 · Source§impl Ord for Frame
impl Ord for Frame
1.0.0 · Source§impl PartialOrd for Frame
impl PartialOrd for Frame
1.0.0 · Source§impl Step for Frame
impl Step for Frame
Source§fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
🔬This is a nightly-only experimental API. (
step_trait
#42168)Returns the bounds on the number of successor steps required to get from
start
to end
like [Iterator::size_hint()
][Iterator::size_hint()]. Read moreSource§fn forward_checked(start: Self, count: usize) -> Option<Self>
fn forward_checked(start: Self, count: usize) -> Option<Self>
🔬This is a nightly-only experimental API. (
step_trait
#42168)Source§fn backward_checked(start: Self, count: usize) -> Option<Self>
fn backward_checked(start: Self, count: usize) -> Option<Self>
🔬This is a nightly-only experimental API. (
step_trait
#42168)§fn forward(start: Self, count: usize) -> Self
fn forward(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
#42168)§unsafe fn forward_unchecked(start: Self, count: usize) -> Self
unsafe fn forward_unchecked(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
#42168)§fn backward(start: Self, count: usize) -> Self
fn backward(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
#42168)§unsafe fn backward_unchecked(start: Self, count: usize) -> Self
unsafe fn backward_unchecked(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
#42168)impl Address for Frame
Available on non-crate feature
use_std
only.impl Copy for Frame
impl Eq for Frame
impl Sealed for Frame
Available on non-crate feature
use_std
only.impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
#126799)