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
#![cfg_attr(feature = "docinclude", feature(external_doc))]
#![cfg_attr(feature = "docinclude", doc(include = "../README.md"))]

// Re-exports //
pub use async_trait::async_trait;
pub use mongodb;
pub use mongodb::bson;

pub use wither_derive::Model;
#[cfg(any(feature = "sync"))]
pub use wither_derive::ModelSync;

// Common //
mod error;
pub use error::{Result, WitherError};
mod common;
pub use common::IndexModel;

// Async //
mod cursor;
pub use cursor::ModelCursor;

mod migration;
pub use migration::{IntervalMigration, Migration};
mod model;
pub use model::Model;

/// All traits needed for basic usage of the wither system.
pub mod prelude {
    pub use crate::migration::{Migrating, Migration};
    pub use crate::model::Model;
    pub use wither_derive::Model;
}