Skip to main content

CommandDispatcher

Trait CommandDispatcher 

Source
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§

Required Methods§

Source

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,

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.

Implementors§