[−][src]Function bson::encode_document
pub fn encode_document<'a, S: AsRef<str> + 'a, W: Write + ?Sized, D: IntoIterator<Item = (&'a S, &'a Bson)>>(
writer: &mut W,
doc: D
) -> EncoderResult<()>
Attempt to encode a Document
into a byte stream.
Can encode any type which is iterable as (key: &str, value: &Bson)
pairs,
which generally means most maps.