Skip to main content

CommandHandler

Trait CommandHandler 

Source
pub trait CommandHandler<C, E>: Send + Sync
where C: Command, E: Event,
{ // Required method fn handle<'life0, 'async_trait>( &'life0 self, command: C, ) -> Pin<Box<dyn Future<Output = Result<Vec<E>, CommandError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; }
Expand description

Command handler trait

Required Methods§

Source

fn handle<'life0, 'async_trait>( &'life0 self, command: C, ) -> Pin<Box<dyn Future<Output = Result<Vec<E>, CommandError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Execute the command

Implementors§