Skip to main content

EventExt

Trait EventExt 

Source
pub trait EventExt {
    // Required methods
    fn event_type(&self) -> String;
    fn normalized_event_type(&self) -> String;
    fn payload(&self) -> Value;
}
Expand description

Convenience helpers for Event.

Required Methods§

Source

fn event_type(&self) -> String

Return the Pascal-case wire type name (e.g. "TurnBegin").

Source

fn normalized_event_type(&self) -> String

Return the snake-case normalized type name (e.g. "turn_begin").

Source

fn payload(&self) -> Value

Serialize the event back to a JSON value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§