mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-10 20:12:25 +01:00
Rename dispatcher.simple to dispatcher.filter
This commit is contained in:
parent
4194e3d283
commit
d719bdea91
5 changed files with 8 additions and 8 deletions
|
@ -4,7 +4,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{
|
||||
dispatcher::{
|
||||
filter::Filter, handler::Handler, simple::error_policy::ErrorPolicy,
|
||||
filter::Filter, handler::Handler, filter::error_policy::ErrorPolicy,
|
||||
updater::Updater,
|
||||
},
|
||||
types::{CallbackQuery, ChosenInlineResult, Message, Update, UpdateKind},
|
||||
|
@ -17,7 +17,7 @@ type Handlers<'a, T, E> =
|
|||
|
||||
/// Dispatcher that dispatches updates from telegram.
|
||||
///
|
||||
/// This is 'simple' implementation with following limitations:
|
||||
/// This is 'filter' implementation with following limitations:
|
||||
/// - Error (`E` generic parameter) _must_ implement [`std::fmt::Debug`]
|
||||
/// - All 'handlers' are boxed
|
||||
/// - Handler's fututres are also boxed
|
||||
|
@ -38,7 +38,7 @@ type Handlers<'a, T, E> =
|
|||
/// use std::convert::Infallible;
|
||||
/// use telebofr::{
|
||||
/// dispatcher::{
|
||||
/// simple::{error_policy::ErrorPolicy, FilterDispatcher},
|
||||
/// filter::{error_policy::ErrorPolicy, FilterDispatcher},
|
||||
/// updater::polling,
|
||||
/// },
|
||||
/// };
|
||||
|
@ -67,7 +67,7 @@ type Handlers<'a, T, E> =
|
|||
///
|
||||
/// [`std::fmt::Debug`]: std::fmt::Debug
|
||||
/// [Custom error policy]:
|
||||
/// crate::dispatcher::simple::error_policy::ErrorPolicy::Custom [updater]:
|
||||
/// crate::dispatcher::filter::error_policy::ErrorPolicy::Custom [updater]:
|
||||
/// crate::dispatcher::updater
|
||||
pub struct FilterDispatcher<'a, E> {
|
||||
message_handlers: Handlers<'a, Message, E>,
|
||||
|
@ -314,7 +314,7 @@ mod tests {
|
|||
|
||||
use crate::{
|
||||
dispatcher::{
|
||||
simple::{error_policy::ErrorPolicy, FilterDispatcher},
|
||||
filter::{error_policy::ErrorPolicy, FilterDispatcher},
|
||||
updater::StreamUpdater,
|
||||
},
|
||||
types::{
|
|
@ -6,7 +6,7 @@ pub use handler::Handler;
|
|||
|
||||
pub mod filter;
|
||||
pub mod handler;
|
||||
pub mod simple;
|
||||
pub mod filter;
|
||||
pub mod updater;
|
||||
|
||||
#[async_trait(? Send)]
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
/// A simple method for testing your bot's auth token. Requires no parameters.
|
||||
/// A filter method for testing your bot's auth token. Requires no parameters.
|
||||
/// Returns basic information about the bot in form of a [`User`] object.
|
||||
pub struct GetMe<'a> {
|
||||
bot: &'a Bot,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/// This object represents one button of the reply keyboard. For simple text
|
||||
/// This object represents one button of the reply keyboard. For filter text
|
||||
/// buttons String can be used instead of this object to specify text of the
|
||||
/// button. Optional fields are mutually exclusive.
|
||||
#[derive(Debug, Serialize, Deserialize, Hash, PartialEq, Eq, Clone)]
|
||||
|
|
Loading…
Reference in a new issue