Trait data_stream::FromStream
source · [−]pub trait FromStream<S>: Sized {
fn from_stream<R: Read>(stream: &mut R) -> Result<Self>;
}
Expand description
A trait for types, which can be read from streams.
Required Methods
sourcefn from_stream<R: Read>(stream: &mut R) -> Result<Self>
fn from_stream<R: Read>(stream: &mut R) -> Result<Self>
Reads a value of this type from a stream and returns it. Returns an error on failure instead.