Skip to main content

QueryDispatcher

Trait QueryDispatcher 

Source
pub trait QueryDispatcher<Q>: Send + Sync
where Q: Query,
{ // Required method fn dispatch(&self, query: Q) -> BoxFuture<'_, SoapResult<Q::Output>>; }
Expand description

Dispatches one concrete query type while preserving its output type.

Every QueryHandler<Q> implements this port automatically.

Required Methods§

Source

fn dispatch(&self, query: Q) -> BoxFuture<'_, SoapResult<Q::Output>>

Dispatches the query to its typed handler or pipeline.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<Q, H> QueryDispatcher<Q> for H
where Q: Query, H: QueryHandler<Q> + ?Sized,