Skip to main content

Command

Trait Command 

Source
pub trait Command
where Self: Send + Sync + 'static,
{ type Response: Send + Sync + 'static; type Error: Send; }
Expand description

Command metadata used by generated mediators.

Most users should derive this with #[derive(MediCommand)] from the medi-rs-macros crate.

Required Associated Types§

Source

type Response: Send + Sync + 'static

Response type returned by the command handler.

Source

type Error: Send

Concrete application error returned by the command handler.

MediCommand uses core::convert::Infallible when its error_type attribute is omitted.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§