Trait slack::EventHandler [] [src]

pub trait EventHandler {
    fn on_event(&mut self, cli: &RtmClient, event: Event);
    fn on_close(&mut self, cli: &RtmClient);
    fn on_connect(&mut self, cli: &RtmClient);
}

Implement this trait in your code to handle message events

Required Methods

When a message is received this will be called with self, the slack client, and the Event received.

Called when the connection is closed for any reason.

Called when the connection is opened.

Implementors