Handler

Trait Handler 

Source
pub trait Handler: Send + Sync {
    // Required methods
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        adapter: &'static dyn AdapterApi,
        event: Event,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &str;

    // Provided method
    fn rank(&self) -> u8 { ... }
}
Expand description

事件处理器

Required Methods§

Source

fn handle<'life0, 'async_trait>( &'life0 self, adapter: &'static dyn AdapterApi, event: Event, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn name(&self) -> &str

Provided Methods§

Source

fn rank(&self) -> u8

Implementors§