pub trait AggregateCommand<A: Aggregate> {
type Event: AggregateEvent<A>;
type Events: Events<ProducedEvent<A, Self>>;
type Error: CqrsError;
// Required method
fn execute_on(self, aggregate: &A) -> Result<Self::Events, Self::Error>;
}Expand description
A command that can be executed against an aggregate.
Required Associated Types§
Sourcetype Event: AggregateEvent<A>
type Event: AggregateEvent<A>
The type of event that is produced by this command.
Sourcetype Events: Events<ProducedEvent<A, Self>>
type Events: Events<ProducedEvent<A, Self>>
The type of the sequence of events generated when the command is executed successfully.