bitstream_io::write

Trait ToByteStream

Source
pub trait ToByteStream {
    type Error;

    // Required method
    fn to_writer<W: ByteWrite + ?Sized>(
        &self,
        w: &mut W,
    ) -> Result<(), Self::Error>
       where Self: Sized;
}
Expand description

Implemented by complex types that don’t require any additional context to build themselves to a writer

Required Associated Types§

Source

type Error

Error generated during building, such as io::Error

Required Methods§

Source

fn to_writer<W: ByteWrite + ?Sized>(&self, w: &mut W) -> Result<(), Self::Error>
where Self: Sized,

Generate self to writer

Implementors§