mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 19:49:19 +01:00
Don't export REPLs to teloxide::dispatching
This commit is contained in:
parent
7097dd4f34
commit
62bf55c8e6
5 changed files with 11 additions and 7 deletions
|
@ -43,20 +43,17 @@
|
||||||
//! [`tokio::sync::mpsc::UnboundedReceiver`]: https://docs.rs/tokio/0.2.11/tokio/sync/mpsc/struct.UnboundedReceiver.html
|
//! [`tokio::sync::mpsc::UnboundedReceiver`]: https://docs.rs/tokio/0.2.11/tokio/sync/mpsc/struct.UnboundedReceiver.html
|
||||||
//! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/tree/master/examples/dialogue_bot
|
//! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/tree/master/examples/dialogue_bot
|
||||||
|
|
||||||
mod commands_repl;
|
|
||||||
pub mod dialogue;
|
pub mod dialogue;
|
||||||
mod dispatcher;
|
mod dispatcher;
|
||||||
mod dispatcher_handler;
|
mod dispatcher_handler;
|
||||||
mod dispatcher_handler_rx_ext;
|
mod dispatcher_handler_rx_ext;
|
||||||
mod repl;
|
pub(crate) mod repls;
|
||||||
pub mod update_listeners;
|
pub mod update_listeners;
|
||||||
mod update_with_cx;
|
mod update_with_cx;
|
||||||
|
|
||||||
pub use commands_repl::{commands_repl, commands_repl_with_listener};
|
|
||||||
pub use dispatcher::Dispatcher;
|
pub use dispatcher::Dispatcher;
|
||||||
pub use dispatcher_handler::DispatcherHandler;
|
pub use dispatcher_handler::DispatcherHandler;
|
||||||
pub use dispatcher_handler_rx_ext::DispatcherHandlerRxExt;
|
pub use dispatcher_handler_rx_ext::DispatcherHandlerRxExt;
|
||||||
pub use repl::{repl, repl_with_listener};
|
|
||||||
use tokio::sync::mpsc::UnboundedReceiver;
|
use tokio::sync::mpsc::UnboundedReceiver;
|
||||||
pub use update_with_cx::UpdateWithCx;
|
pub use update_with_cx::UpdateWithCx;
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ where
|
||||||
/// bot.
|
/// bot.
|
||||||
///
|
///
|
||||||
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
||||||
/// [`commands_repl`]: crate::dispatching::commands_repl()
|
/// [`commands_repl`]: crate::dispatching::repls::commands_repl()
|
||||||
/// [`UpdateListener`]: crate::dispatching::update_listeners::UpdateListener
|
/// [`UpdateListener`]: crate::dispatching::update_listeners::UpdateListener
|
||||||
pub async fn commands_repl_with_listener<'a, Cmd, H, Fut, L, ListenerE, HandlerE>(
|
pub async fn commands_repl_with_listener<'a, Cmd, H, Fut, L, ListenerE, HandlerE>(
|
||||||
bot: Bot,
|
bot: Bot,
|
5
src/dispatching/repls/mod.rs
Normal file
5
src/dispatching/repls/mod.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
mod commands_repl;
|
||||||
|
mod repl;
|
||||||
|
|
||||||
|
pub use commands_repl::{commands_repl, commands_repl_with_listener};
|
||||||
|
pub use repl::{repl, repl_with_listener};
|
|
@ -42,7 +42,7 @@ where
|
||||||
/// bot.
|
/// bot.
|
||||||
///
|
///
|
||||||
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
/// [`Dispatcher`]: crate::dispatching::Dispatcher
|
||||||
/// [`repl`]: crate::dispatching::repl()
|
/// [`repl`]: crate::dispatching::repls::repl()
|
||||||
/// [`UpdateListener`]: crate::dispatching::update_listeners::UpdateListener
|
/// [`UpdateListener`]: crate::dispatching::update_listeners::UpdateListener
|
||||||
pub async fn repl_with_listener<'a, H, Fut, E, L, ListenerE>(bot: Bot, handler: H, listener: L)
|
pub async fn repl_with_listener<'a, H, Fut, E, L, ListenerE>(bot: Bot, handler: H, listener: L)
|
||||||
where
|
where
|
|
@ -42,7 +42,9 @@
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
pub use bot::{Bot, BotBuilder};
|
pub use bot::{Bot, BotBuilder};
|
||||||
pub use dispatching::{commands_repl, commands_repl_with_listener, repl, repl_with_listener};
|
pub use dispatching::repls::{
|
||||||
|
commands_repl, commands_repl_with_listener, repl, repl_with_listener,
|
||||||
|
};
|
||||||
pub use errors::{ApiErrorKind, DownloadError, KnownApiErrorKind, RequestError};
|
pub use errors::{ApiErrorKind, DownloadError, KnownApiErrorKind, RequestError};
|
||||||
|
|
||||||
mod errors;
|
mod errors;
|
||||||
|
|
Loading…
Reference in a new issue