Struct BitCounter
struct BitCounter<N, E: Endianness> { ... }
For counting the number of bits written but generating no output.
Example
use ;
let mut writer: = new;
writer.write.unwrap;
writer.write.unwrap;
writer.write.unwrap;
assert_eq!;
Implementations
impl<N: Default + Copy, E: Endianness> BitCounter<N, E>
fn new() -> SelfCreates new counter
fn written(self: &Self) -> NReturns number of bits written
impl<N, E> BitWrite for BitCounter<N, E>
fn write_bit(self: &mut Self, _bit: bool) -> Result<()>fn write<U>(self: &mut Self, bits: u32, value: U) -> Result<()> where U: Numericfn write_out<BITS: u32, U>(self: &mut Self, value: U) -> Result<()> where U: Numericfn write_signed<S>(self: &mut Self, bits: u32, value: S) -> Result<()> where S: SignedNumericfn write_signed_out<BITS: u32, S>(self: &mut Self, value: S) -> Result<()> where S: SignedNumericfn write_from<V>(self: &mut Self, value: V) -> Result<()> where V: Primitivefn write_as_from<F, V>(self: &mut Self, value: V) -> Result<()> where F: Endianness, V: Primitivefn write_unary1(self: &mut Self, value: u32) -> Result<()>fn write_unary0(self: &mut Self, value: u32) -> Result<()>fn write_bytes(self: &mut Self, buf: &[u8]) -> Result<()>fn byte_aligned(self: &Self) -> bool
impl<N, E> Freeze for BitCounter<N, E>
impl<N, E> HuffmanWrite for BitCounter<N, E>
fn write_huffman<T>(self: &mut Self, tree: &WriteHuffmanTree<E, T>, symbol: T) -> Result<()> where T: Ord + Copy
impl<N, E> RefUnwindSafe for BitCounter<N, E>
impl<N, E> Send for BitCounter<N, E>
impl<N, E> Sync for BitCounter<N, E>
impl<N, E> Unpin for BitCounter<N, E>
impl<N, E> UnsafeUnpin for BitCounter<N, E>
impl<N, E> UnwindSafe for BitCounter<N, E>
impl<N: $crate::default::Default, E: $crate::default::Default + Endianness> Default for BitCounter<N, E>
fn default() -> BitCounter<N, E>
impl<T> Any for BitCounter<N, E>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for BitCounter<N, E>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for BitCounter<N, E>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for BitCounter<N, E>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for BitCounter<N, E>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for BitCounter<N, E>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for BitCounter<N, E>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>