mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
fix docs
This commit is contained in:
parent
83d3a11be9
commit
d9b18abd55
2 changed files with 6 additions and 8 deletions
|
@ -3,13 +3,12 @@ use crate::{
|
|||
update_listeners, update_listeners::UpdateListener, HandlerExt, UpdateFilterExt,
|
||||
},
|
||||
error_handlers::LoggingErrorHandler,
|
||||
requests::{Requester, ResponseResult},
|
||||
types::Update,
|
||||
utils::command::BotCommands,
|
||||
RequestError,
|
||||
};
|
||||
use dptree::di::{DependencyMap, Injectable};
|
||||
use std::{fmt::Debug, marker::PhantomData};
|
||||
use teloxide_core::requests::Requester;
|
||||
|
||||
/// A [REPL] for commands.
|
||||
//
|
||||
|
@ -58,7 +57,7 @@ pub async fn commands_repl<'a, R, Cmd, H, Args>(bot: R, handler: H, cmd: Phantom
|
|||
where
|
||||
R: Requester + Clone + Send + Sync + 'static,
|
||||
<R as Requester>::GetUpdates: Send,
|
||||
H: Injectable<DependencyMap, Result<(), RequestError>, Args> + Send + Sync + 'static,
|
||||
H: Injectable<DependencyMap, ResponseResult<()>, Args> + Send + Sync + 'static,
|
||||
Cmd: BotCommands + Send + Sync + 'static,
|
||||
{
|
||||
let cloned_bot = bot.clone();
|
||||
|
@ -123,7 +122,7 @@ pub async fn commands_repl_with_listener<'a, R, Cmd, H, L, Args>(
|
|||
cmd: PhantomData<Cmd>,
|
||||
) where
|
||||
Cmd: BotCommands + Send + Sync + 'static,
|
||||
H: Injectable<DependencyMap, Result<(), RequestError>, Args> + Send + Sync + 'static,
|
||||
H: Injectable<DependencyMap, ResponseResult<()>, Args> + Send + Sync + 'static,
|
||||
L: UpdateListener + Send + 'a,
|
||||
L::Err: Debug + Send + 'a,
|
||||
R: Requester + Clone + Send + Sync + 'static,
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
use crate::{
|
||||
dispatching::{update_listeners, update_listeners::UpdateListener, UpdateFilterExt},
|
||||
error_handlers::LoggingErrorHandler,
|
||||
requests::{Requester, ResponseResult},
|
||||
types::Update,
|
||||
RequestError,
|
||||
};
|
||||
use dptree::di::{DependencyMap, Injectable};
|
||||
use std::fmt::Debug;
|
||||
use teloxide_core::requests::Requester;
|
||||
|
||||
/// A [REPL] for messages.
|
||||
//
|
||||
|
@ -47,7 +46,7 @@ pub async fn repl<R, H, Args>(bot: R, handler: H)
|
|||
where
|
||||
R: Requester + Send + Sync + Clone + 'static,
|
||||
<R as Requester>::GetUpdates: Send,
|
||||
H: Injectable<DependencyMap, Result<(), RequestError>, Args> + Send + Sync + 'static,
|
||||
H: Injectable<DependencyMap, ResponseResult<()>, Args> + Send + Sync + 'static,
|
||||
{
|
||||
let cloned_bot = bot.clone();
|
||||
repl_with_listener(bot, handler, update_listeners::polling_default(cloned_bot).await).await;
|
||||
|
@ -94,7 +93,7 @@ where
|
|||
pub async fn repl_with_listener<R, H, L, Args>(bot: R, handler: H, listener: L)
|
||||
where
|
||||
R: Requester + Clone + Send + Sync + 'static,
|
||||
H: Injectable<DependencyMap, Result<(), RequestError>, Args> + Send + Sync + 'static,
|
||||
H: Injectable<DependencyMap, ResponseResult<()>, Args> + Send + Sync + 'static,
|
||||
L: UpdateListener + Send,
|
||||
L::Err: Debug,
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue