pub(super) struct GuestCluster(pub u64);
Expand description
Guest cluster index.
Tuple Fields§
§0: u64
Implementations§
Source§impl GuestCluster
impl GuestCluster
Sourcepub fn offset(self, cluster_bits: u32) -> GuestOffset
pub fn offset(self, cluster_bits: u32) -> GuestOffset
Return this cluster’s offset.
Sourcepub fn l1_index(self, cluster_bits: u32) -> usize
pub fn l1_index(self, cluster_bits: u32) -> usize
Return this cluster’s L2 table’s index in the L1 table.
Sourcepub fn from_l1_l2_indices(
l1_index: usize,
l2_index: usize,
cluster_bits: u32,
) -> Self
pub fn from_l1_l2_indices( l1_index: usize, l2_index: usize, cluster_bits: u32, ) -> Self
Return the cluster at the given L1 and L2 table indices.
Sourcepub fn next_in_l2(self, cluster_bits: u32) -> Option<GuestCluster>
pub fn next_in_l2(self, cluster_bits: u32) -> Option<GuestCluster>
Return the next cluster in this L2 table, if any.
Return None
if this is the last cluster in this L2 table.
Sourcepub fn first_in_next_l2(self, cluster_bits: u32) -> GuestCluster
pub fn first_in_next_l2(self, cluster_bits: u32) -> GuestCluster
Return the first cluster in the next L2 table.
Trait Implementations§
Source§impl Add<ClusterCount> for GuestCluster
impl Add<ClusterCount> for GuestCluster
Source§type Output = GuestCluster
type Output = GuestCluster
The resulting type after applying the
+
operator.Source§fn add(self, rhs: ClusterCount) -> Self
fn add(self, rhs: ClusterCount) -> Self
Performs the
+
operation. Read moreSource§impl AddAssign<ClusterCount> for GuestCluster
impl AddAssign<ClusterCount> for GuestCluster
Source§fn add_assign(&mut self, rhs: ClusterCount)
fn add_assign(&mut self, rhs: ClusterCount)
Performs the
+=
operation. Read moreSource§impl Clone for GuestCluster
impl Clone for GuestCluster
Source§fn clone(&self) -> GuestCluster
fn clone(&self) -> GuestCluster
Returns a copy 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 GuestCluster
impl Debug for GuestCluster
Source§impl Hash for GuestCluster
impl Hash for GuestCluster
Source§impl Ord for GuestCluster
impl Ord for GuestCluster
Source§fn cmp(&self, other: &GuestCluster) -> Ordering
fn cmp(&self, other: &GuestCluster) -> 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 GuestCluster
impl PartialEq for GuestCluster
Source§impl PartialOrd for GuestCluster
impl PartialOrd for GuestCluster
Source§impl Sub<ClusterCount> for GuestCluster
impl Sub<ClusterCount> for GuestCluster
Source§type Output = GuestCluster
type Output = GuestCluster
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: ClusterCount) -> Self
fn sub(self, rhs: ClusterCount) -> Self
Performs the
-
operation. Read moreSource§impl Sub for GuestCluster
impl Sub for GuestCluster
Source§type Output = ClusterCount
type Output = ClusterCount
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: Self) -> ClusterCount
fn sub(self, rhs: Self) -> ClusterCount
Performs the
-
operation. Read moreSource§impl SubAssign<ClusterCount> for GuestCluster
impl SubAssign<ClusterCount> for GuestCluster
Source§fn sub_assign(&mut self, rhs: ClusterCount)
fn sub_assign(&mut self, rhs: ClusterCount)
Performs the
-=
operation. Read moreimpl Copy for GuestCluster
impl Eq for GuestCluster
impl StructuralPartialEq for GuestCluster
Auto Trait Implementations§
impl Freeze for GuestCluster
impl RefUnwindSafe for GuestCluster
impl Send for GuestCluster
impl Sync for GuestCluster
impl Unpin for GuestCluster
impl UnwindSafe for GuestCluster
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