Trait songbird::events::EventHandler[][src]

pub trait EventHandler: Send + Sync {
#[must_use]    fn act<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 EventContext<'life2>
    ) -> Pin<Box<dyn Future<Output = Option<Event>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }

Trait to handle an event which can be fired per-track, or globally.

These may be feasibly reused between several event sources.

Required methods

#[must_use]fn act<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    ctx: &'life1 EventContext<'life2>
) -> Pin<Box<dyn Future<Output = Option<Event>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Respond to one received event.

Loading content...

Implementors

Loading content...