mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +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
|
||||
/// 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)::+) => {
|
||||
|
|
Loading…
Reference in a new issue