pub trait ToByteStreamWith {
    type Context;
    type Error;

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

Implemented by complex types that require additional context to build themselves to a writer

Required Associated Types§

source

type Context

Some context to use when writing

source

type Error

Error generated during building, such as io::Error

Required Methods§

source

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

Generate self to writer

Implementors§