pub trait CommandHandler<C>: Send + Syncwhere
C: Command,{
// Required method
fn command(&self, command: C) -> BoxFuture<'_, SoapResult<C::Output>>;
}Expand description
Handles one concrete command type.
The method is named command to keep execute reserved for
crate::UseCase. A command handler may itself contain application logic,
delegate to a use case, or be implemented by a native adapter for a named
infrastructure operation.
Required Methods§
Sourcefn command(&self, command: C) -> BoxFuture<'_, SoapResult<C::Output>>
fn command(&self, command: C) -> BoxFuture<'_, SoapResult<C::Output>>
Handles the command.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".