Trait tlb::BitReader

source ·
pub trait BitReader {
    type Error: Error;

    // Required method
    fn read_bit(&mut self) -> Result<bool, Self::Error>;

    // Provided methods
    fn read_bits_into(
        &mut self,
        dst: &mut BitSlice<u8, Msb0>
    ) -> Result<(), Self::Error> { ... }
    fn skip(&mut self, n: usize) -> Result<(), Self::Error> { ... }
}

Required Associated Types§

Required Methods§

source

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

Provided Methods§

source

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

source

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

Implementations on Foreign Types§

source§

impl BitReader for &BitSlice<u8, Msb0>

§

type Error = StringError

source§

fn read_bit( &mut self ) -> Result<bool, <&BitSlice<u8, Msb0> as BitReader>::Error>

source§

fn read_bits_into( &mut self, dst: &mut BitSlice<u8, Msb0> ) -> Result<(), <&BitSlice<u8, Msb0> as BitReader>::Error>

source§

fn skip( &mut self, n: usize ) -> Result<(), <&BitSlice<u8, Msb0> as BitReader>::Error>

source§

impl<R> BitReader for &mut R
where R: BitReader + ?Sized,

§

type Error = <R as BitReader>::Error

source§

fn read_bit(&mut self) -> Result<bool, <&mut R as BitReader>::Error>

source§

fn read_bits_into( &mut self, dst: &mut BitSlice<u8, Msb0> ) -> Result<(), <&mut R as BitReader>::Error>

source§

fn skip(&mut self, n: usize) -> Result<(), <&mut R as BitReader>::Error>

source§

impl<R> BitReader for Box<R>
where R: BitReader + ?Sized,

§

type Error = <R as BitReader>::Error

source§

fn read_bit(&mut self) -> Result<bool, <Box<R> as BitReader>::Error>

source§

fn read_bits_into( &mut self, dst: &mut BitSlice<u8, Msb0> ) -> Result<(), <Box<R> as BitReader>::Error>

source§

fn skip(&mut self, n: usize) -> Result<(), <Box<R> as BitReader>::Error>

Implementors§

source§

impl<'de> BitReader for CellParser<'de>

§

type Error = <&'de BitSlice<u8, Msb0> as BitReader>::Error

source§

impl<R, F, E> BitReader for MapErr<R, F>
where R: BitReader, F: FnMut(<R as BitReader>::Error) -> E, E: Error,

§

type Error = E

source§

impl<R, W> BitReader for TeeReader<R, W>
where R: BitReader, W: BitWriter,

§

type Error = <R as BitReader>::Error