From d25efa9e1487101f4493af991f5395b6008d21e6 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Wed, 2 Feb 2022 05:00:45 +0600 Subject: [PATCH] Document `UpdateHandler`, `DefaultHandler` --- src/dispatching2/dispatcher.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dispatching2/dispatcher.rs b/src/dispatching2/dispatcher.rs index a6c44d8d..308acf20 100644 --- a/src/dispatching2/dispatcher.rs +++ b/src/dispatching2/dispatcher.rs @@ -100,8 +100,11 @@ pub struct Dispatcher { // TODO: it is allowed to return message as response on telegram request in // webhooks, so we can allow this too. See more there: https://core.telegram.org/bots/api#making-requests-when-getting-updates -// FIXME: remove 'static lifetime? + +/// A handler that processes updates from Telegram. pub type UpdateHandler = dptree::Handler<'static, DependencyMap, Result<(), Err>>; + +/// A handler that processes unhandled updates. pub type DefaultHandler = dptree::Handler<'static, DependencyMap, (), Infallible>; impl Dispatcher