pub fn from_reader<T, R>(mut reader: R) -> Result<T, Error>
where
    T: de::DeserializeOwned,
    R: Read,
{
    let mut buf = vec![];
    reader.read_to_end(&mut buf).map_err(|e| {
        de::Error::custom(format_args!("could not read input: {}", e))
    })?;
    from_bytes(&buf)
}
/// Convenience function that reads all bytes from `reader` and deserializes
/// them with `from_bytes`.
Convenience function that reads all bytes from `reader` and deserializes
them with `from_bytes`.
Convenience function that reads all bytes from ` reader ` and deserializes them with ` from_bytes ` .
pub fn from_reader<T, R>(mut reader: R) -> Result<T, Error>
where
    T: de::DeserializeOwned,
    R: Read,
{
    let mut buf = vec![];
    reader.read_to_end(&mut buf).map_err(|e| {
        de::Error::custom(format_args!("could not read input: {}", e))
    })?;
    from_bytes(&buf)
}
pub fn from_reader < T , R > ( mut reader : R ) -> Result < T , Error > where T : de :: DeserializeOwned , R : Read , { let mut buf = vec ! [ ] ; reader . read_to_end ( & mut buf ) . map_err ( | e | { de :: Error :: custom ( format_args ! ( " " e ) ) } ) ? ; from_bytes ( & buf ) }
Convenience function that reads all bytes from `reader` and deserializes
them with `from_bytes`.
Convenience function that reads all bytes from ` reader ` and deserializes them with ` from_bytes ` .
reader
R
reader
R