struct BitCounter {
count: usize,
total: usize,
head_byte: u8,
}Fields§
§count: usizeTotal number of non-zero bytes we found.
total: usizeTotal bytes we found.
head_byte: u8The last non-zero byte we found.
Implementations§
Trait Implementations§
Source§impl Debug for BitCounter
impl Debug for BitCounter
Source§impl Default for BitCounter
impl Default for BitCounter
Source§fn default() -> BitCounter
fn default() -> BitCounter
Returns the “default value” for a type. Read more
Source§impl Write for BitCounter
impl Write for BitCounter
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Auto Trait Implementations§
impl Freeze for BitCounter
impl RefUnwindSafe for BitCounter
impl Send for BitCounter
impl Sync for BitCounter
impl Unpin for BitCounter
impl UnwindSafe for BitCounter
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more