Trait cqrs_es2::IQueryStore[][src]

pub trait IQueryStore<C: ICommand, E: IEvent, A: IAggregate<C, E>, Q: IQuery<C, E>>: IEventDispatcher<C, E> {
    fn load(
        &mut self,
        aggregate_id: &str
    ) -> Result<QueryContext<C, E, Q>, AggregateError>;
fn commit(
        &mut self,
        context: QueryContext<C, E, Q>
    ) -> Result<(), AggregateError>; fn dispatch_events(
        &mut self,
        aggregate_id: &str,
        events: &[EventContext<C, E>]
    ) -> Result<(), AggregateError> { ... } }
Expand description

The abstract central source for loading and committing queries.

Required methods

loads the query

commits the query

Provided methods

used as a default implementation for dispatching

Implementors