Skip to main content

AsyncQueryHandler

Trait AsyncQueryHandler 

Source
pub trait AsyncQueryHandler {
    type Query;
    type Result;
    type Error;

    // Required method
    fn handle<'a>(
        &'a self,
        query: Self::Query,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Result, Self::Error>> + Send + 'a>>
       where Self: Sync + 'a,
             Self::Query: Send + 'a,
             Self::Result: Send + 'a,
             Self::Error: Send + 'a;
}
Expand description

English:
Handles a query asynchronously without requiring aggregate lifecycle operations.

日本語:
集約ライフサイクル操作を伴わずにクエリを非同期処理します。

Required Associated Types§

Required Methods§

Source

fn handle<'a>( &'a self, query: Self::Query, ) -> Pin<Box<dyn Future<Output = Result<Self::Result, Self::Error>> + Send + 'a>>
where Self: Sync + 'a, Self::Query: Send + 'a, Self::Result: Send + 'a, Self::Error: Send + 'a,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§