Trait BitRead

Source
pub trait BitRead: Read {
    // Required method
    fn read_bits(&mut self, dest: &mut BitSlice) -> Result<usize>;

    // Provided method
    fn read_bits_exact(&mut self, dest: &mut BitSlice) -> Result<()> { ... }
}
Expand description

The BitRead trait allows for reading bits from a source.

Required Methods§

Source

fn read_bits(&mut self, dest: &mut BitSlice) -> Result<usize>

Pull some bits from this source into the specified buffer, returning how many bytes were read.

Provided Methods§

Source

fn read_bits_exact(&mut self, dest: &mut BitSlice) -> Result<()>

Read the exact number of bits required to fill buf.

Implementors§