cqrs_es/lib.rs
1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3#![deny(clippy::all)]
4#![warn(rust_2018_idioms)]
5#![doc = include_str!("../README.md")]
6//!
7pub use crate::aggregate::*;
8pub use crate::cqrs::*;
9pub use crate::error::*;
10pub use crate::event::*;
11pub use crate::query::*;
12pub use crate::store::*;
13
14mod aggregate;
15mod cqrs;
16mod error;
17mod event;
18mod query;
19mod store;
20
21#[doc(hidden)]
22pub mod doc;
23
24/// An in-memory event store suitable for local testing.
25///
26/// A backing store is necessary for any application to store and retrieve the generated events.
27/// This in-memory store is useful for application development and integration tests that do not
28/// require persistence after running.
29///
30/// ```
31/// # use cqrs_es::doc::{MyAggregate, MyService};
32/// use cqrs_es::CqrsFramework;
33/// use cqrs_es::mem_store::MemStore;
34///
35/// let store = MemStore::<MyAggregate>::default();
36/// let service = MyService::default();
37/// let cqrs = CqrsFramework::new(store, vec![], service);
38/// ```
39pub mod mem_store;
40
41pub mod persist;
42
43pub mod test;