pub fn from_reader<R, T>(reader: R) -> Result<T>
where
    T: DeserializeOwned,
    R: Read,
{
    let bytes = reader_to_vec(reader)?;
    from_slice(bytes.as_slice())
}
/// Deserialize an instance of type `T` from an I/O stream of BSON.
Deserialize an instance of type `T` from an I/O stream of BSON.
Deserialize an instance of type ` T ` from an I / O stream of BSON .
pub fn from_reader<R, T>(reader: R) -> Result<T>
where
    T: DeserializeOwned,
    R: Read,
{
    let bytes = reader_to_vec(reader)?;
    from_slice(bytes.as_slice())
}
pub fn from_reader < R , T > ( reader : R ) -> Result < T > where T : DeserializeOwned , R : Read , { let bytes = reader_to_vec ( reader ) ? ; from_slice ( bytes . as_slice ( ) ) }
Deserialize an instance of type `T` from an I/O stream of BSON.
Deserialize an instance of type ` T ` from an I / O stream of BSON .
reader
R
reader
R