Skip to main content

EventHandler

Trait EventHandler 

Source
pub trait EventHandler {
    // Required methods
    fn on_connect(&mut self, event: NotificationEvent);
    fn on_auth(&mut self, event: NotificationEvent);
    fn on_subscribed(&mut self, event: NotificationEvent);
    fn on_data_event(&mut self, event: DataEvent);
    fn on_error(&mut self, message: Error);
}

Required Methods§

Source

fn on_connect(&mut self, event: NotificationEvent)

Source

fn on_auth(&mut self, event: NotificationEvent)

Source

fn on_subscribed(&mut self, event: NotificationEvent)

Source

fn on_data_event(&mut self, event: DataEvent)

Source

fn on_error(&mut self, message: Error)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§