Skip to main content

event

Attribute Macro event 

Source
#[event]
Expand description

Defines an event struct for use with the event queue.

Generates the Event trait implementation and derives Clone.

§Example

#[event(key = "mail.send.failed")]
struct MailFailedEvent {
    to: String,
    error: String,
}