Attribute Macro command_handler
Source #[command_handler]
Available on crate features cqrs and di only.
Expand description
Marks a function as a Command Handler
Command handlers process commands and produce events.
§Example
ⓘ#[command_handler]
async fn handle_create_user(cmd: CreateUserCommand) -> Result<Vec<Event>, String> {
Ok(vec![Event::UserCreated { ... }])
}