pub trait Handler:
Send
+ Sync
+ 'static {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
) -> Pin<Box<dyn Future<Output = BotResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Core trait for all update handlers.
Implementors receive a Context and return a future that resolves to
BotResult<()>. Returning Ok(()) allows subsequent handlers to run;
the dispatcher stops the chain on Err.