Skip to main content

SystemHandler

Trait SystemHandler 

Source
pub trait SystemHandler: Send + Sync {
    // Required method
    fn process<'life0, 'life1, 'async_trait>(
        &'life0 self,
        client: Arc<DingTalkStream>,
        message: &'life1 SystemMessage,
    ) -> Pin<Box<dyn Future<Output = Result<Resp, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn pre_start(&self) { ... }
}
Expand description

System handler trait for handling system messages

Required Methods§

Source

fn process<'life0, 'life1, 'async_trait>( &'life0 self, client: Arc<DingTalkStream>, message: &'life1 SystemMessage, ) -> Pin<Box<dyn Future<Output = Result<Resp, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Process a system message

Provided Methods§

Source

fn pre_start(&self)

Pre-start hook

Implementors§