pub trait CommandDispatcher: Send + Sync {
type Uow: UnitOfWork;
// Required method
async fn dispatch<H>(
&self,
handler: &H,
request_context: &RequestContext,
command: H::Command,
) -> Result<H::Output, CommandDispatchError<H::Error>>
where H: CommandHandler<Uow = Self::Uow>,
H::Command: Command;
}Required Associated Types§
type Uow: UnitOfWork
Required Methods§
async fn dispatch<H>( &self, handler: &H, request_context: &RequestContext, command: H::Command, ) -> Result<H::Output, CommandDispatchError<H::Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.