Trait evento_store::Engine
source · pub trait Engine: Clone {
// Required methods
fn save<A: Aggregate, I: Into<String>>(
&self,
id: I,
events: Vec<Event>,
original_version: i32
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + '_>>;
fn load<A: Aggregate, I: Into<String>>(
&self,
id: I
) -> Pin<Box<dyn Future<Output = EngineResult<A>> + Send + '_>>;
fn get<A: Aggregate, I: Into<String>>(
&self,
id: I
) -> Pin<Box<dyn Future<Output = Result<Option<Event>, Error>> + Send + '_>>;
fn get_last(
&self
) -> Pin<Box<dyn Future<Output = Result<Option<Event>, Error>> + Send + '_>>;
fn read_all<F: Serialize>(
&self,
first: usize,
after: Option<Uuid>,
filters: Option<Vec<F>>
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + '_>>;
}Required Methods§
fn save<A: Aggregate, I: Into<String>>( &self, id: I, events: Vec<Event>, original_version: i32 ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + '_>>
fn load<A: Aggregate, I: Into<String>>( &self, id: I ) -> Pin<Box<dyn Future<Output = EngineResult<A>> + Send + '_>>
fn get<A: Aggregate, I: Into<String>>( &self, id: I ) -> Pin<Box<dyn Future<Output = Result<Option<Event>, Error>> + Send + '_>>
fn get_last( &self ) -> Pin<Box<dyn Future<Output = Result<Option<Event>, Error>> + Send + '_>>
fn read_all<F: Serialize>( &self, first: usize, after: Option<Uuid>, filters: Option<Vec<F>> ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + '_>>
Object Safety§
This trait is not object safe.