pub trait BitWriter {
type Error: Error;
// Required methods
fn capacity_left(&self) -> usize;
fn write_bit(&mut self, bit: bool) -> Result<(), Self::Error>;
// Provided methods
fn write_bitslice(
&mut self,
bits: &BitSlice<u8, Msb0>,
) -> Result<(), Self::Error> { ... }
fn repeat_bit(&mut self, n: usize, bit: bool) -> Result<(), Self::Error> { ... }
}Expand description
Bitwise writer.
Required Associated Types§
Required Methods§
Sourcefn capacity_left(&self) -> usize
fn capacity_left(&self) -> usize
Returns remaining capacity in bits