[][src]Trait slack::EventHandler

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

fn on_event(&mut self, cli: &RtmClient, event: Event)

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

fn on_close(&mut self, cli: &RtmClient)

Called when the connection is closed for any reason.

fn on_connect(&mut self, cli: &RtmClient)

Called when the connection is opened.

Loading content...

Implementors

Loading content...