pub trait CommandDispatcher<C>: Send + Syncwhere
C: Command,{
// Required method
fn dispatch(&self, command: C) -> BoxFuture<'_, SoapResult<C::Output>>;
}Expand description
Dispatches one concrete command type while preserving its output type.
Every CommandHandler<C> implements this port automatically. It exists
so application boundaries can use dispatch terminology without introducing
a runtime service locator or erasing message and output types.
Required Methods§
Sourcefn dispatch(&self, command: C) -> BoxFuture<'_, SoapResult<C::Output>>
fn dispatch(&self, command: C) -> BoxFuture<'_, SoapResult<C::Output>>
Dispatches the command to its typed handler or pipeline.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".