Trait QQBotProtocol

Source
pub trait QQBotProtocol: Send {
    // Required methods
    fn build_bot_token(&self) -> String;
    fn build_request(&self, method: Method, url: Url) -> RequestBuilder;

    // Provided methods
    fn subscription(&self) -> Subscription { ... }
    fn on_connected<'life0, 'async_trait>(
        &'life0 mut self,
        event: HeartbeatEvent,
    ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_login_success<'life0, 'async_trait>(
        &'life0 mut self,
        event: LoginEvent,
    ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_login_failure<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_heartbeat<'life0, 'async_trait>(
        &'life0 mut self,
        heartbeat_id: u32,
    ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_message<'life0, 'async_trait>(
        &'life0 mut self,
        event: MessageEvent,
    ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_emoji<'life0, 'async_trait>(
        &'life0 mut self,
        event: EmojiEvent,
    ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_save<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Provided Methods§

Source

fn subscription(&self) -> Subscription

Source

fn on_connected<'life0, 'async_trait>( &'life0 mut self, event: HeartbeatEvent, ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_login_success<'life0, 'async_trait>( &'life0 mut self, event: LoginEvent, ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_login_failure<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_heartbeat<'life0, 'async_trait>( &'life0 mut self, heartbeat_id: u32, ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_message<'life0, 'async_trait>( &'life0 mut self, event: MessageEvent, ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_emoji<'life0, 'async_trait>( &'life0 mut self, event: EmojiEvent, ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_save<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = QQResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§