Trait persist_es::PersistedSnapshotEventRepository[][src]

pub trait PersistedSnapshotEventRepository<A>: Send + Sync where
    A: Aggregate
{ fn get_snapshot<'life0, 'life1, 'async_trait>(
        &'life0 self,
        aggregate_id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Option<SnapshotStoreAggregateContext<A>>, PersistenceError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn persist<'life0, 'life1, 'async_trait>(
        &'life0 self,
        aggregate: A,
        aggregate_id: String,
        current_snapshot: usize,
        events: &'life1 [EventEnvelope<A>]
    ) -> Pin<Box<dyn Future<Output = Result<(), PersistenceError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

Handles the database access needed for operation of a PersistedSnapshotStore.

Required methods

Returns the current snapshot for an aggregate instance.

Commits the updated aggregate and accompanying events.

Implementors