atomr_patterns/ddd/mod.rs
1//! Domain-Driven-Design primitives shared by every pattern.
2//!
3//! These traits are the *vocabulary*: an [`AggregateRoot`] is the
4//! transactional consistency boundary, a [`Command`] requests a state
5//! change inside one, a [`DomainEvent`] records the fact that the change
6//! happened, an [`Entity`] is anything with a stable identity, and a
7//! [`ValueObject`] is anything whose identity is its value. The
8//! [`Repository`] is how callers reach an aggregate.
9
10mod aggregate;
11mod command;
12mod domain_event;
13mod entity;
14mod repository;
15mod value_object;
16
17pub use aggregate::AggregateRoot;
18pub use command::Command;
19pub use domain_event::DomainEvent;
20pub use entity::Entity;
21pub use repository::Repository;
22pub use value_object::ValueObject;