Trait EventStore
Source pub trait EventStore<A>{
// Required methods
fn load_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<A>>, CqrsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_events_from_version<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
version: usize,
) -> Pin<Box<dyn Future<Output = Result<EventStream<A>, CqrsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_events<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EventStream<A>, CqrsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_events_paged<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
page: usize,
page_size: usize,
) -> Pin<Box<dyn Future<Output = Result<(Vec<EventEnvelope<A>>, i64), CqrsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
events: Vec<A::Event>,
aggregate: &'life1 A,
metadata: HashMap<String, String>,
version: usize,
context: &'life2 CqrsContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope<A>>, CqrsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn initialize_aggregate<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(A, usize), CqrsError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn load_aggregate<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(A, usize), CqrsError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}