pub trait FromByteStreamWith {
    type Context;
    type Error;

    // Required method
    fn from_reader<R: ByteRead + ?Sized>(
        r: &mut R,
        context: &Self::Context
    ) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

Implemented by complex types that require some additional context to parse themselves from a reader. Analagous to FromStr.

Required Associated Types§

source

type Context

Some context to use when parsing

source

type Error

Error generated during parsing, such as io::Error

Required Methods§

source

fn from_reader<R: ByteRead + ?Sized>( r: &mut R, context: &Self::Context ) -> Result<Self, Self::Error>where Self: Sized,

Parse Self from reader

Implementors§