fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: de::Deserializer<'de>,
    {
        deserializer.deserialize_map(BsonVisitor).and_then(|bson| {
            if let Bson::Document(doc) = bson {
                Ok(doc)
            } else {
                let err = format!("expected document, found extended JSON data type: {}", bson);
                Err(de::Error::invalid_type(Unexpected::Map, &&err[..]))
            }
        })
    }
/// Deserialize this value given this `Deserializer`.
Deserialize this value given this `Deserializer`.
Deserialize this value given this ` Deserializer ` .
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: de::Deserializer<'de>,
    {
        deserializer.deserialize_map(BsonVisitor).and_then(|bson| {
            if let Bson::Document(doc) = bson {
                Ok(doc)
            } else {
                let err = format!("expected document, found extended JSON data type: {}", bson);
                Err(de::Error::invalid_type(Unexpected::Map, &&err[..]))
            }
        })
    }
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error > where D : de :: Deserializer < ' de > , { deserializer . deserialize_map ( BsonVisitor ) . and_then ( | bson | { if let Bson :: Document ( doc ) = bson { Ok ( doc ) } else { let err = format ! ( " " bson ) ; Err ( de :: Error :: invalid_type ( Unexpected :: Map , & & err [ .. ] ) ) } } ) }
Deserialize this value given this `Deserializer`.
Deserialize this value given this ` Deserializer ` .
deserializer
D
deserializer
D