Expand description
The Event trait and the DynEvent helper.
An Event is a fire-and-forget broadcast identified by a string
id. Unlike Command, events have no
handler — consumers subscribe via
CommandRegistry::on and
receive the deserialized payload.
For compile-time events, the #[event] attribute macro generates
the trait impl from a payload struct. For runtime-constructed
events (plugin runtimes, FFI, scripting hosts), DynEvent lets
you build an Event whose id is owned at runtime.
Structs§
- DynEvent
- A runtime-constructed
Event. Use this when the event id or payload shape is only known at runtime (plugin runtimes, FFI, scripting hosts).
Traits§
- Event
- A typed event payload.