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
//! Generic DDD tactical building blocks: the kernel every bounded context
//! implements — typed identities, entities, aggregate roots, domain events,
//! repositories, gateways, the unit of work, and specifications.
//!
//! It is deliberately I/O-free and `wasm32`-safe, so a domain layer that builds
//! on it can compile to wasm. The only async here is `#[async_trait]` trait
//! *definitions* (boxed-future signatures), which pull in no runtime. Concrete
//! implementations (sqlx, an external ledger, …) live in the consuming service.
//!
//! # Object safety at a glance
//!
//! | Trait | Held behind `dyn`? |
//! | --- | --- |
//! | [`Identifier`] / [`Id`] | no — always concrete |
//! | [`Entity`] / [`AggregateRoot`] | no |
//! | [`Repository`] / [`Reader`] | yes |
//! | [`Gateway`] | yes |
//! | [`UnitOfWork`] | yes |
//! | [`DomainEvent`] / [`EmitsEvents`] | no |
//! | [`Specification`] | yes (the `holds` method) |
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;