pub trait TRepository<E: Executor, A: Aggregate>:
REventManager<A>
+ Sync
+ Send {
// Required methods
fn new(executor: Arc<RwLock<E>>) -> Self;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<A, BaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
aggregate: &'life1 mut A,
) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add<'life0, 'life1, 'async_trait>(
&'life0 mut self,
aggregate: &'life1 mut A,
) -> Pin<Box<dyn Future<Output = Result<String, BaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Methods§
fn new(executor: Arc<RwLock<E>>) -> Self
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<A, BaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
aggregate: &'life1 mut A,
) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add<'life0, 'life1, 'async_trait>(
&'life0 mut self,
aggregate: &'life1 mut A,
) -> Pin<Box<dyn Future<Output = Result<String, BaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.