Trait bit_manager::BitWrite [] [src]

pub trait BitWrite: Sized {
    fn write_bit(&mut self, bit: bool) -> Result<()>;

    fn write_byte(&mut self, byte: u8) -> Result<()> { ... }
fn write<T: BitStore>(&mut self, value: &T) -> Result<()> { ... }
fn write_using<T, C>(&mut self, value: &T, converter: &C) -> Result<()>
    where
        C: BitConvert<T>
, { ... } }

A trait for types that can write bits

Required Methods

Writes a single bit.

Provided Methods

Writes a single byte.

Default implementation is unoptimized and should be overridden

Writes a value that implements BitStore using the write_to function.

Writes a value using a converter that implements BitConvert with the write_value_to function.

Implementors