Enum divan::counter::BytesFormat
source · #[non_exhaustive]pub enum BytesFormat {
Decimal,
Binary,
}
Expand description
The numerical base for BytesCount
in benchmark outputs.
See Divan::bytes_format
for more info.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Decimal
Powers of 1000, starting with KB (kilobyte). This is the default.
Binary
Powers of 1024, starting with KiB (kibibyte).
Trait Implementations§
source§impl Clone for BytesFormat
impl Clone for BytesFormat
source§fn clone(&self) -> BytesFormat
fn clone(&self) -> BytesFormat
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 Default for BytesFormat
impl Default for BytesFormat
source§fn default() -> BytesFormat
fn default() -> BytesFormat
Returns the “default value” for a type. Read more
source§impl Ord for BytesFormat
impl Ord for BytesFormat
source§fn cmp(&self, other: &BytesFormat) -> Ordering
fn cmp(&self, other: &BytesFormat) -> 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 BytesFormat
impl PartialEq for BytesFormat
source§fn eq(&self, other: &BytesFormat) -> bool
fn eq(&self, other: &BytesFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for BytesFormat
impl PartialOrd for BytesFormat
source§fn partial_cmp(&self, other: &BytesFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &BytesFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for BytesFormat
impl Eq for BytesFormat
impl StructuralEq for BytesFormat
impl StructuralPartialEq for BytesFormat
Auto Trait Implementations§
impl RefUnwindSafe for BytesFormat
impl Send for BytesFormat
impl Sync for BytesFormat
impl Unpin for BytesFormat
impl UnwindSafe for BytesFormat
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