mongodb 0.9.1

The official MongoDB driver for Rust (currently in alpha)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
mod connection_string;
mod document;

use bson::{Bson, Document};

use crate::{error::Result, options::WriteConcern};

fn write_concern_to_document(write_concern: &WriteConcern) -> Result<Document> {
    match bson::to_bson(&write_concern)? {
        Bson::Document(doc) => Ok(doc),
        _ => unreachable!(),
    }
}