pub trait DomainEventHandler<T: AggregateRootEx>: Send + Sync {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
entity: T,
event: T::DomainEvent,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Trait for representing a Domain Event Handler.
See AggregateRootEx for more information about Domain Events and the example for RepositoryEx about this trait’s usage.