Struct divan::counter::BytesCount
source · pub struct BytesCount { /* private fields */ }
Expand description
Process N bytes.
Implementations§
source§impl BytesCount
impl BytesCount
sourcepub const fn of<T>() -> Self
pub const fn of<T>() -> Self
Counts the size of a type with std::mem::size_of
.
sourcepub fn of_val<T: ?Sized>(val: &T) -> Self
pub fn of_val<T: ?Sized>(val: &T) -> Self
Counts the size of a value with std::mem::size_of_val
.
sourcepub fn of_iter<T, I>(iter: I) -> Selfwhere
I: IntoIterator<Item = T>,
pub fn of_iter<T, I>(iter: I) -> Selfwhere
I: IntoIterator<Item = T>,
Counts the bytes of Iterator::Item
s.
Trait Implementations§
source§impl Clone for BytesCount
impl Clone for BytesCount
source§fn clone(&self) -> BytesCount
fn clone(&self) -> BytesCount
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 BytesCount
impl Debug for BytesCount
source§impl Ord for BytesCount
impl Ord for BytesCount
source§fn cmp(&self, other: &BytesCount) -> Ordering
fn cmp(&self, other: &BytesCount) -> 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 BytesCount
impl PartialEq for BytesCount
source§fn eq(&self, other: &BytesCount) -> bool
fn eq(&self, other: &BytesCount) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for BytesCount
impl PartialOrd for BytesCount
source§fn partial_cmp(&self, other: &BytesCount) -> Option<Ordering>
fn partial_cmp(&self, other: &BytesCount) -> 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 BytesCount
impl Counter for BytesCount
impl Eq for BytesCount
impl StructuralEq for BytesCount
impl StructuralPartialEq for BytesCount
Auto Trait Implementations§
impl RefUnwindSafe for BytesCount
impl Send for BytesCount
impl Sync for BytesCount
impl Unpin for BytesCount
impl UnwindSafe for BytesCount
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<C> IntoCounter for Cwhere
C: Counter,
impl<C> IntoCounter for Cwhere
C: Counter,
source§fn into_counter(self) -> <C as IntoCounter>::Counter
fn into_counter(self) -> <C as IntoCounter>::Counter
Converts into a
Counter
.