[][src]Module domain_patterns::event

Event module holds the event trait that defines characteristics of all domain events.

Traits

DomainEvent

DomainEvent is a trait that defines an event relevant to the domain. These are always facts about something that has already occurred that has domain significance. An event has a time at which the event occurred, and an id that corresponds to which aggregate id the event corresponds to. The implementor should also be sure to pass the aggregates version in when they create the event, so that events can be processed in the correct order.

DomainEvents

DomainEvents is a thin wrapper over an enum that contains all generics that implement DomainEvent trait. As far as I can tell there's no way to constrain that all variants of an enum enforce the same trait.

EventApplier