[][src]Trait webthing::event::Event

pub trait Event: Send + Sync {
    fn get_name(&self) -> String;
fn get_data(&self) -> Option<Value>;
fn get_time(&self) -> String; fn as_event_description(&self) -> Map<String, Value> { ... } }

High-level Event trait.

Required methods

fn get_name(&self) -> String

Get the event's name.

fn get_data(&self) -> Option<Value>

Get the event's data.

fn get_time(&self) -> String

Get the event's timestamp.

Loading content...

Provided methods

fn as_event_description(&self) -> Map<String, Value>

Get the event description.

Returns a JSON map describing the event.

Loading content...

Implementors

impl Event for BaseEvent[src]

fn get_name(&self) -> String[src]

Get the event's name.

fn get_data(&self) -> Option<Value>[src]

Get the event's data.

fn get_time(&self) -> String[src]

Get the event's timestamp.

Loading content...