pub trait EventStore: Send + Sync {
// Required methods
fn append<'life0, 'async_trait>(
&'life0 self,
event: ExecutionEvent,
) -> Pin<Box<dyn Future<Output = Result<EventLogEntry>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_by_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 ExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_after<'life0, 'async_trait>(
&'life0 self,
after_sequence: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn latest_sequence<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Event store trait - persistence backend
Required Methods§
Sourcefn append<'life0, 'async_trait>(
&'life0 self,
event: ExecutionEvent,
) -> Pin<Box<dyn Future<Output = Result<EventLogEntry>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
event: ExecutionEvent,
) -> Pin<Box<dyn Future<Output = Result<EventLogEntry>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append an event to the log
Sourcefn get_by_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 ExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_by_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 ExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventLogEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get events for an execution