[][src]Trait cqrs_es::EventStore

pub trait EventStore<A, E> where
    A: Aggregate,
    E: DomainEvent<A>, 
{ fn load(&self, aggregate_id: &str) -> Vec<EventEnvelope<A, E>>;
fn commit(
        &self,
        events: Vec<EventEnvelope<A, E>>
    ) -> Result<(), AggregateError>; }

The abstract central source for loading past events and committing new events.

Required methods

fn load(&self, aggregate_id: &str) -> Vec<EventEnvelope<A, E>>

Load all events for a particular aggregate_id

fn commit(&self, events: Vec<EventEnvelope<A, E>>) -> Result<(), AggregateError>

Commit new events

Loading content...

Implementors

impl<A, E> EventStore<A, E> for MemStore<A, E> where
    A: Aggregate,
    E: DomainEvent<A>, 
[src]

Loading content...