Skip to main content

Message

Trait Message 

Source
pub trait Message:
    Send
    + Sync
    + 'static {
    const NAME: &'static str;

    // Provided method
    fn name(&self) -> &'static str { ... }
}
Expand description

Envelope carried by the messenger bus.

NAME is the stable routing key used for handler registration and dispatch.

Required Associated Constants§

Source

const NAME: &'static str

Stable message name (for example cart.place_order).

Provided Methods§

Source

fn name(&self) -> &'static str

Returns Self::NAME.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§