Trait cqrs_es2::EventStore [−][src]
pub trait EventStore<A, AC> where
A: Aggregate,
AC: AggregateContext<A>, { fn load(&mut self, aggregate_id: &str) -> Vec<EventEnvelope<A>>; fn load_aggregate(&mut self, aggregate_id: &str) -> AC; fn commit(
&mut self,
events: Vec<A::Event>,
context: AC,
metadata: HashMap<String, String>
) -> Result<Vec<EventEnvelope<A>>, AggregateError>; fn wrap_events(
&self,
aggregate_id: &str,
current_sequence: usize,
resultant_events: Vec<A::Event>,
base_metadata: HashMap<String, String>
) -> Vec<EventEnvelope<A>> { ... } }
Expand description
The abstract central source for loading past events and committing new events.
Required methods
fn load(&mut self, aggregate_id: &str) -> Vec<EventEnvelope<A>>
fn load(&mut self, aggregate_id: &str) -> Vec<EventEnvelope<A>>
Load all events for a particular aggregate_id
fn load_aggregate(&mut self, aggregate_id: &str) -> AC
fn load_aggregate(&mut self, aggregate_id: &str) -> AC
Load aggregate at current state