[][src]Trait cqrs::AggregateCommand

pub trait AggregateCommand<A> where
    A: Aggregate
{ type Event: AggregateEvent<A>; type Events: Events<Self::Event>; type Error: CqrsError; fn execute_on(self, aggregate: &A) -> Result<Self::Events, Self::Error>; }

A command that can be executed against an aggregate.

Associated Types

type Event: AggregateEvent<A>

The type of event that is produced by this command.

type Events: Events<Self::Event>

The type of the sequence of events generated when the command is executed successfully.

type Error: CqrsError

The error type.

Loading content...

Required methods

fn execute_on(self, aggregate: &A) -> Result<Self::Events, Self::Error>

Consumes a command, attempting to execute it against the aggregate. If the execution is successful, a sequence of events is generated, which can be applied to the aggregate.

Loading content...

Implementors

Loading content...