mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Yet another fix
This commit is contained in:
parent
16aca0f0f8
commit
ee3a95b31e
3 changed files with 6 additions and 3 deletions
|
@ -2,8 +2,8 @@ use std::{convert::Infallible, fmt::Debug, future::Future, pin::Pin};
|
|||
|
||||
/// An asynchronous polymorphic handler of a context.
|
||||
///
|
||||
/// Note that `AsyncHandler` is implemented for asynchronous `Fn`s, that consume
|
||||
/// `Ctx` and return `Output`.
|
||||
/// See [the module-level documentation for the design
|
||||
/// overview](crate::dispatching).
|
||||
pub trait AsyncHandler<Ctx, Output> {
|
||||
#[must_use]
|
||||
fn handle<'a>(
|
||||
|
|
|
@ -16,6 +16,9 @@ type H<'a, Upd, HandlerE> =
|
|||
Option<Box<dyn AsyncHandler<HandlerCtx<Upd>, Result<(), HandlerE>> + 'a>>;
|
||||
|
||||
/// One dispatcher to rule them all.
|
||||
///
|
||||
/// See [the module-level documentation for the design
|
||||
/// overview](crate::dispatching).
|
||||
pub struct Dispatcher<'a, HandlerE> {
|
||||
bot: Arc<Bot>,
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ pub use in_mem_storage::InMemStorage;
|
|||
///
|
||||
/// For a storage based on a simple hash map, see [`InMemStorage`].
|
||||
///
|
||||
/// [`InMemStorage`]: crate::dispatching::private::InMemStorage
|
||||
/// [`InMemStorage`]: crate::dispatching::session::InMemStorage
|
||||
#[async_trait(?Send)]
|
||||
#[async_trait]
|
||||
pub trait Storage<Session> {
|
||||
|
|
Loading…
Add table
Reference in a new issue