pub trait AsyncLifecycleCallback<A, R, P>where
A: AggregateRoot + Send,
R: AsyncRepository<Aggregate = A> + Send,
P: AsyncDomainEventPublisher<Event = <A as AggregateRoot>::Event> + Send,
<A as AggregateRoot>::Event: Send + Sync,
<R as AsyncRepository>::Error: Send,
<P as AsyncDomainEventPublisher>::Error: Send,{
type Output;
type Error;
// Required method
fn call<'storage, 'callback>(
self,
context: &'callback mut AsyncLifecycleContext<'storage, A, R, P>,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'callback>>
where 'storage: 'callback,
A: 'storage,
R: 'storage,
P: 'storage,
<A as AggregateRoot>::Event: 'storage,
<R as AsyncRepository>::Error: 'storage,
<P as AsyncDomainEventPublisher>::Error: 'storage,
Self: Send + 'callback,
Self::Output: Send + 'callback,
Self::Error: Send + 'callback;
}Expand description
English:
Defines asynchronous work performed with a mutable asynchronous lifecycle context.
日本語:
非同期ライフサイクルコンテキストを使って実行する非同期処理を定義します。
Required Associated Types§
Required Methods§
fn call<'storage, 'callback>(
self,
context: &'callback mut AsyncLifecycleContext<'storage, A, R, P>,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'callback>>where
'storage: 'callback,
A: 'storage,
R: 'storage,
P: 'storage,
<A as AggregateRoot>::Event: 'storage,
<R as AsyncRepository>::Error: 'storage,
<P as AsyncDomainEventPublisher>::Error: 'storage,
Self: Send + 'callback,
Self::Output: Send + 'callback,
Self::Error: Send + 'callback,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".