Skip to main content

QueryHandler

Trait QueryHandler 

Source
pub trait QueryHandler<Q: Query, R: Send + Sync + 'static>: Send + Sync {
    // Required method
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        query: Q,
    ) -> Pin<Box<dyn Future<Output = QueryResult<R>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature cqrs only.
Expand description

Query handler trait

Required Methods§

Source

fn handle<'life0, 'async_trait>( &'life0 self, query: Q, ) -> Pin<Box<dyn Future<Output = QueryResult<R>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the query

Implementors§