Trait RenderEvent

Source
pub trait RenderEvent {
    const EVENT_NAME: &'static str;

    // Required methods
    fn render_event_data(&self, renderer: &Renderer) -> Result<String, Error>;
    fn event_info(&self) -> EventInfo;
}

Required Associated Constants§

Source

const EVENT_NAME: &'static str

the event name

Required Methods§

Source

fn render_event_data(&self, renderer: &Renderer) -> Result<String, Error>

render the event data for SSE with the format as encoded_json\nencoded_html

Source

fn event_info(&self) -> EventInfo

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§