Trait tlb::BitWriter

source ·
pub trait BitWriter {
    type Error: Error;

    // Required method
    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> { ... }
}

Required Associated Types§

Required Methods§

source

fn write_bit(&mut self, bit: bool) -> Result<(), Self::Error>

Provided Methods§

source

fn write_bitslice( &mut self, bits: &BitSlice<u8, Msb0> ) -> Result<(), Self::Error>

source

fn repeat_bit(&mut self, n: usize, bit: bool) -> Result<(), Self::Error>

Implementations on Foreign Types§

source§

impl<S> BitWriter for BitVec<S, Msb0>
where S: BitStore,

§

type Error = StringError

source§

fn write_bit( &mut self, bit: bool ) -> Result<(), <BitVec<S, Msb0> as BitWriter>::Error>

source§

fn write_bitslice( &mut self, bits: &BitSlice<u8, Msb0> ) -> Result<(), <BitVec<S, Msb0> as BitWriter>::Error>

source§

fn repeat_bit( &mut self, n: usize, bit: bool ) -> Result<(), <BitVec<S, Msb0> as BitWriter>::Error>

source§

impl<W> BitWriter for &mut W
where W: BitWriter + ?Sized,

§

type Error = <W as BitWriter>::Error

source§

fn write_bit(&mut self, bit: bool) -> Result<(), <&mut W as BitWriter>::Error>

source§

fn write_bitslice( &mut self, bits: &BitSlice<u8, Msb0> ) -> Result<(), <&mut W as BitWriter>::Error>

source§

fn repeat_bit( &mut self, n: usize, bit: bool ) -> Result<(), <&mut W as BitWriter>::Error>

source§

impl<W> BitWriter for Box<W>
where W: BitWriter + ?Sized,

§

type Error = <W as BitWriter>::Error

source§

fn write_bit(&mut self, bit: bool) -> Result<(), <Box<W> as BitWriter>::Error>

source§

fn write_bitslice( &mut self, bits: &BitSlice<u8, Msb0> ) -> Result<(), <Box<W> as BitWriter>::Error>

source§

fn repeat_bit( &mut self, n: usize, bit: bool ) -> Result<(), <Box<W> as BitWriter>::Error>

Implementors§