Update the docs of teloxide::handler!

This commit is contained in:
Hirrolot 2022-04-25 01:46:03 +06:00
parent 52678b187c
commit 4ad7dfac49

View file

@ -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
/// state: if the state enumeration is of a certain variant, the execution
/// continues; otherwise, `dptree` will try the next branch.
/// This macro expands to a [`dptree::Handler`] that acts on your enumeration
/// type: if the enumeration is of a certain variant, the execution continues;
/// 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:
///
@ -243,6 +245,8 @@ where
/// ## Dependency requirements
///
/// - Your dialogue state enumeration `State`.
///
/// [`examples/purchase.rs`]: https://github.com/teloxide/teloxide/blob/master/examples/purchase.rs
#[macro_export]
macro_rules! handler {
($($variant:ident)::+) => {