pub(super) struct ClusterCount(pub u64);
Expand description
Cluster count.
Tuple Fields§
§0: u64
Implementations§
Source§impl ClusterCount
impl ClusterCount
Sourcepub fn from_byte_size(byte_size: u64, cluster_bits: u32) -> Self
pub fn from_byte_size(byte_size: u64, cluster_bits: u32) -> Self
Get how many clusters are required to cover byte_size
.
This rounds up.
Sourcepub fn checked_from_byte_size(byte_size: u64, cluster_bits: u32) -> Option<Self>
pub fn checked_from_byte_size(byte_size: u64, cluster_bits: u32) -> Option<Self>
Get how many clusters are in byte_size
.
Checks that byte_size
is a multiple of the cluster size, or will return None
.
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 Add<ClusterCount> for HostCluster
impl Add<ClusterCount> for HostCluster
Source§type Output = HostCluster
type Output = HostCluster
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 Add for ClusterCount
impl Add for ClusterCount
Source§type Output = ClusterCount
type Output = ClusterCount
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 AddAssign<ClusterCount> for HostCluster
impl AddAssign<ClusterCount> for HostCluster
Source§fn add_assign(&mut self, rhs: ClusterCount)
fn add_assign(&mut self, rhs: ClusterCount)
Performs the
+=
operation. Read moreSource§impl AddAssign for ClusterCount
impl AddAssign for ClusterCount
Source§fn add_assign(&mut self, rhs: ClusterCount)
fn add_assign(&mut self, rhs: ClusterCount)
Performs the
+=
operation. Read moreSource§impl Clone for ClusterCount
impl Clone for ClusterCount
Source§fn clone(&self) -> ClusterCount
fn clone(&self) -> ClusterCount
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 ClusterCount
impl Debug for ClusterCount
Source§impl Display for ClusterCount
impl Display for ClusterCount
Source§impl Ord for ClusterCount
impl Ord for ClusterCount
Source§fn cmp(&self, other: &ClusterCount) -> Ordering
fn cmp(&self, other: &ClusterCount) -> 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 ClusterCount
impl PartialEq for ClusterCount
Source§impl PartialOrd for ClusterCount
impl PartialOrd for ClusterCount
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<ClusterCount> for HostCluster
impl Sub<ClusterCount> for HostCluster
Source§type Output = HostCluster
type Output = HostCluster
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 ClusterCount
impl Sub for ClusterCount
Source§type Output = ClusterCount
type Output = ClusterCount
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 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 moreSource§impl SubAssign<ClusterCount> for HostCluster
impl SubAssign<ClusterCount> for HostCluster
Source§fn sub_assign(&mut self, rhs: ClusterCount)
fn sub_assign(&mut self, rhs: ClusterCount)
Performs the
-=
operation. Read moreSource§impl SubAssign for ClusterCount
impl SubAssign for ClusterCount
Source§fn sub_assign(&mut self, rhs: ClusterCount)
fn sub_assign(&mut self, rhs: ClusterCount)
Performs the
-=
operation. Read moreimpl Copy for ClusterCount
impl Eq for ClusterCount
impl StructuralPartialEq for ClusterCount
Auto Trait Implementations§
impl Freeze for ClusterCount
impl RefUnwindSafe for ClusterCount
impl Send for ClusterCount
impl Sync for ClusterCount
impl Unpin for ClusterCount
impl UnwindSafe for ClusterCount
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