pub trait CallbackHandler: Send + Sync {
// Required methods
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
message: &'life1 CallbackMessage,
cb_webhook_msg_sender: Option<Sender<WebhookMessage>>,
) -> Pin<Box<dyn Future<Output = Result<Resp, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn topic(&self) -> &MessageTopic;
// Provided method
fn pre_start(&self) { ... }
}Expand description
Callback handler trait for handling callback messages
Required Methods§
Sourcefn process<'life0, 'life1, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
message: &'life1 CallbackMessage,
cb_webhook_msg_sender: Option<Sender<WebhookMessage>>,
) -> Pin<Box<dyn Future<Output = Result<Resp, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
message: &'life1 CallbackMessage,
cb_webhook_msg_sender: Option<Sender<WebhookMessage>>,
) -> Pin<Box<dyn Future<Output = Result<Resp, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process a callback message
Sourcefn topic(&self) -> &MessageTopic
fn topic(&self) -> &MessageTopic
Get the topic this handler handles