Module command

Source
Expand description

§Example - simple command handler

impl<C,R> TCommandService<(), ()> for CommandHandler<(C, R)>
where
    C: crate::prelude::TCommand + for<'a> TGetHandler<&'a mut R, Result<(), ()>>,
    R: Send + Sync,
{
    async fn execute(mut self) -> Result<(), ()> {
        let CommandHandler((cmd, mut dep)) = self;
        let handler = C::get_handler();
        handler(cmd, &mut dep).await
    }
}

Modules§

uow

Macros§

register_uow_services

Structs§

CommandHandler

Traits§

AsyncFunc
TGetHandler
TUnitOfWorkCommandHandler