Module esrs::aggregate[][src]

Structs

Traits

The Aggregate trait is responsible for validating commands, mapping commands to events, and applying events onto the aggregate state.

The AggregateManager is responsible for loading an aggregate from the store, mapping commands to events, and persisting those events in the store. Be careful when implenting this trait, as you will be responsible for threading AggregateState/Commands/Events correctly. For example, a bad implementation could result in an AggregateState that is not replicated on load.

The Eraser trait is responsible for erasing an aggregate instance from history.

The Identifier trait is responsible for naming an aggregate type. Each aggregate type should have an identifier that is unique among all the aggregate types in your application.