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§
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)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".