pub trait Appender<StreamId, Event>: Send + Sync
where StreamId: Send + Sync, Event: Message + Send + Sync,
{ // Required method fn append<'life0, 'async_trait>( &'life0 self, id: StreamId, version_check: Check, events: Vec<Envelope<Event>> ) -> Pin<Box<dyn Future<Output = Result<Version, AppendError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }
Expand description

Interface used to append new Domain Events in an Event Store.

Required Methods§

source

fn append<'life0, 'async_trait>( &'life0 self, id: StreamId, version_check: Check, events: Vec<Envelope<Event>> ) -> Pin<Box<dyn Future<Output = Result<Version, AppendError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Appens new Domain Events to the specified Event Stream.

The result of this operation is the new Version of the Event Stream with the specified Domain Events added to it.

Implementors§

source§

impl<Id, Evt> Appender<Id, Evt> for InMemory<Id, Evt>
where Id: Clone + Eq + Hash + Send + Sync, Evt: Message + Clone + Send + Sync,

source§

impl<T, StreamId, Event> Appender<StreamId, Event> for InstrumentedEventStore<T, StreamId, Event>
where T: Store<StreamId, Event> + Send + Sync, StreamId: Debug + Send + Sync, Event: Message + Debug + Send + Sync,

source§

impl<T, StreamId, Event> Appender<StreamId, Event> for Tracking<T, StreamId, Event>
where T: Store<StreamId, Event> + Send + Sync, StreamId: Clone + Send + Sync, Event: Message + Clone + Send + Sync,