Trait carapax::handler::UpdateHandler

source ·
pub trait UpdateHandler {
    // Required method
    fn handle(&self, update: Update) -> impl Future<Output = ()> + Send;
}
Expand description

Represents an update handler for processing updates received from the Telegram Bot API.

Required Methods§

source

fn handle(&self, update: Update) -> impl Future<Output = ()> + Send

Handles a received update.

§Arguments
  • update - The received update from the Telegram Bot API.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<H, HI, HO> UpdateHandler for App<H, HI>
where H: Handler<HI, Output = HO> + Sync + 'static, HI: TryFromInput + Sync + 'static, HI::Error: 'static, HO: IntoHandlerResult + Send + 'static,