pub fn from_reader_utf8_lossy<R, T>(reader: R) -> Result<T>where
    T: DeserializeOwned,
    R: Read,
Expand description

Deserialize an instance of type T from an I/O stream of BSON, replacing any invalid UTF-8 sequences with the Unicode replacement character.

This is mainly useful when reading raw BSON returned from a MongoDB server, which in rare cases can contain invalidly truncated strings (https://jira.mongodb.org/browse/SERVER-24007). For most use cases, crate::from_reader can be used instead.