pub fn from_document<T>(doc: Document) -> Result<T>
where
    T: DeserializeOwned,
{
    from_bson(Bson::Document(doc))
}
/// Deserialize a `T` from the provided [`Document`].
///
/// The `Deserializer` used by this function presents itself as human readable, whereas the
/// one used in [`from_slice`] does not. This means that this function may deserialize differently
/// than [`from_slice`] for types that change their deserialization logic depending on whether
/// the format is human readable or not. To deserialize from [`Document`] with a deserializer that
/// presents itself as not human readable, use [`from_document_with_options`] with
/// [`DeserializerOptions::human_readable`] set to false.
Deserialize a `T` from the provided [`Document`].
The `Deserializer` used by this function presents itself as human readable, whereas the
one used in [`from_slice`] does not. This means that this function may deserialize differently
than [`from_slice`] for types that change their deserialization logic depending on whether
the format is human readable or not.
Deserialize a ` T ` from the provided [ ` Document ` ] . The ` Deserializer ` used by this function presents itself as human readable whereas the one used in [ ` from_slice ` ] does not . This means that this function may deserialize differently than [ ` from_slice ` ] for types that change their deserialization logic depending on whether the format is human readable or not .
pub fn from_document<T>(doc: Document) -> Result<T>
where
    T: DeserializeOwned,
{
    from_bson(Bson::Document(doc))
}
pub fn from_document < T > ( doc : Document ) -> Result < T > where T : DeserializeOwned , { from_bson ( Bson :: Document ( doc ) ) }
Deserialize a `T` from the provided [`Document`].
Deserialize a ` T ` from the provided [ ` Document ` ] .
doc
Document
doc
Document