1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! # MongoDB Rust Driver
//!
//! You can connent your MongoDB through mon. But the API can change at any 
//! time, please be careful to use in the production environment.
//! 
//! This driver currently only supports MongoDB 3.2.x, MongoDB 3.4.x and the 
//! updated version.
//!
//! ## Installation
//! #### Dependencies
//! - [Rust 1.14+ with Cargo](http://rust-lang.org)
//! 
//! The driver is avaliable on crates.io. You can add mon package to your 
//! `Cargo.toml`:
//!
//! ```
//! [dependencies]
//! mon = "0.1"
//! ```
//! 
//! Then, import the mon library within your code.
//!
//! ```no_run
//! #[macro_use]
//! extern crate mon;
//! ```
extern crate chrono;
extern crate byteorder;
extern crate libc;
extern crate ring;
extern crate rand;
extern crate linked_hash_map;
extern crate serde;
#[macro_use]
extern crate serde_json;
extern crate data_encoding;
#[macro_use]
extern crate scan_fmt;
extern crate semver;
#[macro_use]
extern crate bitflags;
extern crate base64;

pub use error::Error;
pub use client::Client;
pub use db::Database;
pub use coll::Collection;

#[macro_use]
pub mod bson;
pub mod oid;
pub mod util;

pub mod client;
pub mod stream;
pub mod command_type;
pub mod common;
pub mod apm;
pub mod topology;
pub mod error;
pub mod pool;
pub mod connstring;
pub mod cursor;
pub mod db;
pub mod coll;
pub mod gridfs;
pub mod wire_protocol;
pub mod auth;