Trait CommandHandler

Source
pub trait CommandHandler<TCommand, TResponse> {
    // Required method
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        command: TCommand,
    ) -> Pin<Box<dyn Future<Output = ApplicationResult<TResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generic command handler trait

Required Methods§

Source

fn handle<'life0, 'async_trait>( &'life0 self, command: TCommand, ) -> Pin<Box<dyn Future<Output = ApplicationResult<TResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§