Skip to main content

EventHandler

Trait EventHandler 

Source
pub trait EventHandler<E>:
    Send
    + Sync
    + 'static {
    // Required method
    fn handle(&self, event: E) -> BoxFuture<'_, Result<()>>;
}

Required Methods§

Source

fn handle(&self, event: E) -> BoxFuture<'_, Result<()>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§