pub trait Message {
    // Required method
    fn name(&self) -> &'static str;
}
Expand description

Represents a piece of domain data that occurs in the system.

Each Message has a specific name to it, which should ideally be unique within the domain you’re operating in. Example: a Domain Event that represents when an Order was created can have a name(): "OrderWasCreated".

Required Methods§

source

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

Returns the domain name of the Message.

Implementors§