pub trait BitReader {
fn peek(&self, bits: u8) -> Option<u16>;
fn consume(&mut self, bits: u8);
fn expect(&mut self, bits: Bits) -> Result<(), Option<Bits>> { ... }
}
Expand description
Trait used to read data bitwise.
For lazy people ByteReader
is provided which implements this trait.
Required methods
look at the next (up to 16) bits of data
Data is returned in the lower bits of the u16
.