Trait bit_manager::BitRead
[−]
[src]
pub trait BitRead: Sized { fn read_bit(&mut self) -> Result<bool>; fn read_byte(&mut self) -> Result<u8> { ... } fn read<T: BitStore>(&mut self) -> Result<T> { ... } fn read_using<T, C>(&mut self, converter: &C) -> Result<T>
where
C: BitConvert<T>, { ... } }
A trait for types that can read bits
Required Methods
Provided Methods
fn read_byte(&mut self) -> Result<u8>
Reads a single byte.
Default implementation is unoptimized and should be overridden
fn read<T: BitStore>(&mut self) -> Result<T>
Reads a value that implements BitStore
using the read_from
function.
fn read_using<T, C>(&mut self, converter: &C) -> Result<T> where
C: BitConvert<T>,
C: BitConvert<T>,
Reads a value using a converter that implements BitConvert
with the read_value_from
function.