forked from mongodb/mongo-rust-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync.rs
27 lines (23 loc) · 739 Bytes
/
sync.rs
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
//! Contains the sync API. This is only available when the `sync` feature is enabled.
mod change_stream;
mod client;
mod coll;
mod cursor;
mod db;
pub mod gridfs;
#[cfg(test)]
mod test;
pub use change_stream::{ChangeStream, SessionChangeStream};
pub use client::{session::ClientSession, Client};
pub use coll::Collection;
pub use cursor::{Cursor, SessionCursor, SessionCursorIter};
pub use db::Database;
#[cfg(feature = "tokio-sync")]
lazy_static::lazy_static! {
pub(crate) static ref TOKIO_RUNTIME: tokio::runtime::Runtime = {
match tokio::runtime::Runtime::new() {
Ok(runtime) => runtime,
Err(err) => panic!("Error occurred when starting the underlying async runtime: {}", err)
}
};
}