Trait domafic::listener::Listener [] [src]

pub trait Listener {
    type Message;
    fn event_type_handled(&self) -> &'static str;
    fn handle_event(&self, _: Event) -> Self::Message;
}

Listeners listen to events and convert them into a message

Associated Types

Type of messages created

Required Methods

Type of event handled by this Listener. Example: "click".

Handle a given event, producing a message

Implementors