pub trait EventPayload:
Serialize
+ DeserializeOwned
+ JsonSchema {
const KIND: &'static str;
// Provided method
fn kind() -> EventKind { ... }
}Expand description
One typed payload declared under a kind name, by the domain that owns it.
KIND is the one authoritative source of the kind’s name:
the schema marker is written from it by [event_schema_of], the store’s
kind column is written from it, and the clients’ tables are generated from
the marker.
Required Associated Constants§
Sourceconst KIND: &'static str
const KIND: &'static str
The name this payload’s events are written down under: lowercase
snake_case, as KIND_PATTERN states.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".