mmtickets_common::events

Trait Listener

Source
pub trait Listener {
    // Required method
    fn listen<'life0, 'life1, 'async_trait, T, U>(
        &'life0 self,
        on_event_message: &'life1 T,
        data: Option<Arc<U>>,
    ) -> Pin<Box<dyn Future<Output = Result<(), ListenerError>> + Send + 'async_trait>>
       where T: 'async_trait + OnEventMessage + Send + Sync,
             U: 'async_trait + Any + Send + Sync,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn listen<'life0, 'life1, 'async_trait, T, U>( &'life0 self, on_event_message: &'life1 T, data: Option<Arc<U>>, ) -> Pin<Box<dyn Future<Output = Result<(), ListenerError>> + Send + 'async_trait>>
where T: 'async_trait + OnEventMessage + Send + Sync, U: 'async_trait + Any + Send + Sync, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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§