mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-24 23:57:38 +01:00
Update the docs of teloxide::handler!
This commit is contained in:
parent
52678b187c
commit
4ad7dfac49
1 changed files with 8 additions and 4 deletions
|
@ -214,11 +214,13 @@ where
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Perform a dialogue FSM transition.
|
/// Filters an enumeration, passing its payload forwards.
|
||||||
///
|
///
|
||||||
/// This macro expands to a [`dptree::Handler`] that filters your dialogue
|
/// This macro expands to a [`dptree::Handler`] that acts on your enumeration
|
||||||
/// state: if the state enumeration is of a certain variant, the execution
|
/// type: if the enumeration is of a certain variant, the execution continues;
|
||||||
/// continues; otherwise, `dptree` will try the next branch.
|
/// otherwise, `dptree` will try the next branch. This is very useful for
|
||||||
|
/// dialogue FSM transitions and Telegram command filtering; for a complete
|
||||||
|
/// example, please see [`examples/purchase.rs`].
|
||||||
///
|
///
|
||||||
/// Variants can take the following forms:
|
/// Variants can take the following forms:
|
||||||
///
|
///
|
||||||
|
@ -243,6 +245,8 @@ where
|
||||||
/// ## Dependency requirements
|
/// ## Dependency requirements
|
||||||
///
|
///
|
||||||
/// - Your dialogue state enumeration `State`.
|
/// - Your dialogue state enumeration `State`.
|
||||||
|
///
|
||||||
|
/// [`examples/purchase.rs`]: https://github.com/teloxide/teloxide/blob/master/examples/purchase.rs
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! handler {
|
macro_rules! handler {
|
||||||
($($variant:ident)::+) => {
|
($($variant:ident)::+) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue