bitstream_io::read

Trait FromByteStream

Source
pub trait FromByteStream {
    type Error;

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

Implemented by complex types that don’t require any additional context to parse themselves from a reader. Analagous to FromStr.

Required Associated Types§

Source

type Error

Error generated during parsing, such as io::Error

Required Methods§

Source

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

Parse Self from reader

Implementors§