mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
Expose DefaultHandler
, UpdateHandler
out of dispatcher.rs
This commit is contained in:
parent
2ad4e9a9f7
commit
bacea51adc
2 changed files with 2 additions and 7 deletions
|
@ -37,7 +37,7 @@ macro_rules! define_handlers {
|
|||
#[must_use = "Call .dispatch() or .dispatch_with_listener() function to start dispatching."]
|
||||
pub fn $func(mut self, make_handler: impl FnOnce(UpdateHandler<Err>) -> UpdateHandler<Err>) -> Self {
|
||||
self.allowed_updates.insert(AllowedUpdate::$update);
|
||||
self.handler(make_handler(make_parser!($update)))
|
||||
Dispatcher { handler: self.handler.branch(make_handler(make_parser!($update))), ..self }
|
||||
}
|
||||
)*
|
||||
}
|
||||
|
@ -263,11 +263,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[must_use = "Call .dispatch() or .dispatch_with_listener() function to start dispatching."]
|
||||
pub fn handler(self, handler: UpdateHandler<Err>) -> Self {
|
||||
Dispatcher { handler: self.handler.branch(handler), ..self }
|
||||
}
|
||||
|
||||
#[must_use = "Call .dispatch() or .dispatch_with_listener() function to start dispatching."]
|
||||
// Specify handler that will be called if other handlers was not handle the
|
||||
// update.
|
||||
|
|
|
@ -6,6 +6,6 @@ mod handler_ext;
|
|||
mod handler_factory;
|
||||
pub mod message_filter_ext;
|
||||
|
||||
pub use dispatcher::Dispatcher;
|
||||
pub use dispatcher::{DefaultHandler, Dispatcher, UpdateHandler};
|
||||
pub use handler_ext::HandlerExt;
|
||||
pub use handler_factory::HandlerFactory;
|
||||
|
|
Loading…
Reference in a new issue