pub struct BlockHandle {
pub base: PhysAddr,
pub order: u8,
}Expand description
Lightweight identifier for a physical block.
Fields§
§base: PhysAddrBase physical address of the block.
order: u8Buddy order of the block.
Implementations§
Source§impl BlockHandle
impl BlockHandle
Sourcepub fn size_bytes(&self) -> u64
pub fn size_bytes(&self) -> u64
Returns the block size in bytes.
Sourcepub fn page_count(&self) -> u64
pub fn page_count(&self) -> u64
Returns the number of 4 KiB pages covered by the block.
Trait Implementations§
Source§impl Clone for BlockHandle
impl Clone for BlockHandle
Source§fn clone(&self) -> BlockHandle
fn clone(&self) -> BlockHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockHandle
impl Debug for BlockHandle
Source§impl Hash for BlockHandle
impl Hash for BlockHandle
Source§impl Ord for BlockHandle
impl Ord for BlockHandle
Source§fn cmp(&self, other: &BlockHandle) -> Ordering
fn cmp(&self, other: &BlockHandle) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BlockHandle
impl PartialEq for BlockHandle
Source§impl PartialOrd for BlockHandle
impl PartialOrd for BlockHandle
impl Copy for BlockHandle
impl Eq for BlockHandle
impl StructuralPartialEq for BlockHandle
Auto Trait Implementations§
impl Freeze for BlockHandle
impl RefUnwindSafe for BlockHandle
impl Send for BlockHandle
impl Sync for BlockHandle
impl Unpin for BlockHandle
impl UnsafeUnpin for BlockHandle
impl UnwindSafe for BlockHandle
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
Compare self to
key and return true if they are equal.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