Trait Engine
Source pub trait Engine:
DynClone
+ Send
+ Sync {
// Required methods
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
events: Vec<WriteEvent>,
original_version: u16,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn insert<'life0, 'async_trait>(
&'life0 self,
events: Vec<Event>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn upsert<'life0, 'async_trait>(
&'life0 self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
first: u16,
after: Option<CursorType>,
filters: Option<Vec<Value>>,
aggregate_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<QueryResult<Event>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn last<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Event>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}