pub struct EventDefinition {
pub id: &'static str,
pub label: &'static str,
pub category: EventCategory,
pub scope: EventScope,
pub confidence: DetectionConfidence,
pub summary: &'static str,
pub approach: &'static [&'static str],
pub limitations: &'static [&'static str],
pub hidden_from_review: bool,
pub variants: &'static [EventVariant],
}Expand description
Static, English-language metadata for a stat event type.
Event structs own this definition through StatsEvent. Analysis nodes
then link event definitions to the calculator code that produces them via
EmittedEvent.
Fields§
§id: &'static str§label: &'static str§category: EventCategory§scope: EventScopeHow a timeline client fans this event’s stream out into lanes. Match
(the default) keeps everything on one shared row; Team/Player are the
opt-in exceptions that split into one lane per team or per player. Declared
here so fan-out travels with the event type rather than a side table; the
shipped EventMeta.scope reads from this via EventPayload::scope.
confidence: DetectionConfidence§summary: &'static str§approach: &'static [&'static str]§limitations: &'static [&'static str]When true this definition is a label-like or expansion-parent row that should not be offered as a selectable event type in the review UI.
variants: &'static [EventVariant]Concrete event-type keys this definition expands into at serialization
time (e.g. boost_ledger -> boost_ledger_collected). Expansion parents
are typically also hidden_from_review; their variants are surfaced
instead. Empty for ordinary events.
Implementations§
Source§impl EventDefinition
impl EventDefinition
Set whether this definition is hidden from the review picker. Named to
double as a define_stats_event! modifier (hidden = true).
Sourcepub const fn variants(self, variants: &'static [EventVariant]) -> Self
pub const fn variants(self, variants: &'static [EventVariant]) -> Self
Attach the concrete variant keys this definition expands into. Named to
double as a define_stats_event! modifier (variants = SLICE).
Sourcepub const fn scope(self, scope: EventScope) -> Self
pub const fn scope(self, scope: EventScope) -> Self
Set how this event’s stream fans out into timeline lanes. Named to double
as a define_stats_event! modifier (scope = EventScope::Player). The
default is EventScope::Match (single shared row); declare Player or
Team to opt a stream into per-entity lanes.