EventHandler

Trait EventHandler 

Source
pub trait EventHandler: Send + Sync {
    // Provided methods
    fn on_ready<'life0, 'life1, 'async_trait>(
        &'life0 self,
        entity: &'life1 Entity,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn on_disconnect<'life0, 'life1, 'async_trait>(
        &'life0 self,
        reason: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn on_vote<'life0, 'async_trait>(
        &'life0 self,
        data: VoteData,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_rate<'life0, 'async_trait>(
        &'life0 self,
        data: RateData,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Provided Methods§

Source

fn on_ready<'life0, 'life1, 'async_trait>( &'life0 self, entity: &'life1 Entity, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn on_disconnect<'life0, 'life1, 'async_trait>( &'life0 self, reason: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn on_vote<'life0, 'async_trait>( &'life0 self, data: VoteData, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_rate<'life0, 'async_trait>( &'life0 self, data: RateData, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§