[−][src]Trait domain_patterns::models::AggregateRoot
Associated Types
type Events: DomainEvent
This type alias should point to an enum of events that the aggregate root will create and publish.
type Error
This type alias should point to the root error type for the crate.
Required methods
fn version(&self) -> u64
version is a simple integers that is incremented for every mutation.
This allows us to have something like an EntityCreated
event where we
can pass versions in, and re-order the events for playback in the correct order.
Provided methods
fn next_version(&self) -> u64
next_version simply returns the current version incremented by 1. This default implementation should never have to be overriden.