Event

Trait Event 

Source
pub trait Event:
    Any
    + Send
    + Sync {
    // Required methods
    fn event(&self) -> EventType;
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        client: &'life1 Client,
        data: EventData,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Add a event to the plugin.

Required Methods§

Source

fn event(&self) -> EventType

Type of the event.

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 Client, data: EventData, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Event function.

Implementors§