Attribute Macro teloxide::teloxide [−][src]
#[teloxide]
This is supported on crate feature
macros
only.The docs is below.
The only accepted form at the current moment is #[teloxide(subtransition)]
on an asynchronous function. Either this:
#[teloxide(subtransition)]
async fn my_transition(state: MyState, cx: TransitionIn, ans: T) -> TransitionOut<MyDialogue> {
todo!()
}
Or this:
#[teloxide(subtransition)]
async fn my_transition(state: MyState, cx: TransitionIn) -> TransitionOut<MyDialogue> {
todo!()
}
Notice the presence/absence of ans: T
. In the first case, it generates
impl SubTransition for MyState { type Aux = T; type Dialogue = MyDialogue; ... }
. In the second case, the Aux
type defaults to ()
.