Trait EventHandler

Source
pub trait EventHandler:
    Send
    + Sync
    + Unpin
    + Sized
    + 'static {
    // Provided methods
    fn on_msg(&self, _msg: ProtocolMsg) { ... }
    fn on_connected(&self, _addr: Addr<CallbackStyleConnection<Self>>) { ... }
    fn on_disconnected(&self, _addr: Addr<CallbackStyleConnection<Self>>) { ... }
    fn on_stopped(&self, _addr: Addr<CallbackStyleConnection<Self>>) { ... }
}

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§