Struct Page
pub struct Page<A: Arch>(/* private fields */);Expand description
Represents a memory page.
Page size and alignment is determined according to crate::arch::Arch::PAGE_BITS.
Implementations§
§impl<A: Arch> Page<A>
impl<A: Arch> Page<A>
pub fn start_addr(&self) -> Addr
pub fn start_addr(&self) -> Addr
Returns the lowest address on this page.
pub fn last_address_of_page(&self) -> Addr
pub fn last_address_of_page(&self) -> Addr
Returns the last address of the page.
This is always greater than the value returned by Self::start_addr.
pub fn first_address_after_page(&self) -> Addr
pub fn first_address_after_page(&self) -> Addr
Returns the first address after this page. This may wrap around if the page is the last page in the address space. In that case, the address returned is 0.
pub fn as_u64(self) -> u64
pub fn as_u64(self) -> u64
Converts Self::start_addr to a u64.
Trait Implementations§
§impl<A: Ord + Arch> Ord for Page<A>
impl<A: Ord + Arch> Ord for Page<A>
§impl<A: PartialOrd + Arch> PartialOrd for Page<A>
impl<A: PartialOrd + Arch> PartialOrd for Page<A>
impl<A: Arch> Copy for Page<A>
impl<A: Eq + Arch> Eq for Page<A>
impl<A: Arch> StructuralPartialEq for Page<A>
Auto Trait Implementations§
impl<A> Freeze for Page<A>
impl<A> RefUnwindSafe for Page<A>where
A: RefUnwindSafe,
impl<A> !Send for Page<A>
impl<A> !Sync for Page<A>
impl<A> Unpin for Page<A>
impl<A> UnwindSafe for Page<A>where
A: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more