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§