Skip to main content

Listener

Trait Listener 

Source
pub trait Listener:
    Send
    + Sync
    + 'static {
    // Required method
    fn on_event(
        &self,
        payload: &Value,
    ) -> Pin<Box<dyn Future<Output = ()> + Send>>;
}

Required Methods§

Source

fn on_event(&self, payload: &Value) -> Pin<Box<dyn Future<Output = ()> + Send>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§