pub fn from_slice_utf8_lossy<'de, T>(bytes: &'de [u8]) -> Result<T>
where
    T: Deserialize<'de>,
{
    let mut deserializer = raw::Deserializer::new(bytes, true);
    T::deserialize(&mut deserializer)
}
/// Deserialize an instance of type `T` from a slice of BSON bytes, 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_slice`] can be used instead.
Deserialize an instance of type `T` from a slice of BSON bytes, 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 ().
For most use cases, [`crate::from_slice`] can be used instead.
Deserialize an instance of type ` T ` from a slice of BSON bytes 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 () . For most use cases [ ` crate :: from_slice ` ] can be used instead .
pub fn from_slice_utf8_lossy<'de, T>(bytes: &'de [u8]) -> Result<T>
where
    T: Deserialize<'de>,
{
    let mut deserializer = raw::Deserializer::new(bytes, true);
    T::deserialize(&mut deserializer)
}
pub fn from_slice_utf8_lossy < ' de , T > ( bytes : & ' de [ u8 ] ) -> Result < T > where T : Deserialize < ' de > , { let mut deserializer = raw :: Deserializer :: new ( bytes , true ) ; T :: deserialize ( & mut deserializer ) }
Deserialize an instance of type `T` from a slice of BSON bytes, replacing any invalid UTF-8
sequences with the Unicode replacement character.
Deserialize an instance of type ` T ` from a slice of BSON bytes replacing any invalid UTF - 8 sequences with the Unicode replacement character .
bytes
&'de [u8]
bytes
&'de [u8]