pub fn serialize_to_document<T>(value: &T) -> Result<Document>Available on crate feature
serde only.Expand description
Serialize a T Serializable into a BSON Document.
The Serializer used by this function presents itself as human readable, whereas the
one used in serialize_to_vec does not. This means that this function will produce different
BSON than serialize_to_vec for types that change their serialization output depending on
whether the format is human readable or not.