pub struct BytesCount { /* private fields */ }Expand description
Process N bytes.
Implementations§
Source§impl BytesCount
impl BytesCount
Sourcepub const fn of_many<T>(n: usize) -> Self
pub const fn of_many<T>(n: usize) -> Self
Counts the size of multiple instances of a type with 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 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::Items.
Source§impl BytesCount
Count bytes of multiple values.
impl BytesCount
Count bytes of multiple values.
Trait Implementations§
Source§impl Clone for BytesCount
impl Clone for BytesCount
Source§fn clone(&self) -> BytesCount
fn clone(&self) -> BytesCount
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 BytesCount
impl Debug for BytesCount
Source§impl<C: AsCountUInt> From<C> for BytesCount
impl<C: AsCountUInt> From<C> 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§impl PartialOrd for BytesCount
impl PartialOrd for BytesCount
impl Copy for BytesCount
impl Counter for BytesCount
impl Eq for BytesCount
impl StructuralPartialEq for BytesCount
Auto Trait Implementations§
impl Freeze for BytesCount
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.