state_shift

Attribute Macro switch_to

source
#[switch_to]
Expand description

Denotes to which state will the object transition into after this method

Usage:

  • #[switch_to(State1)]
  • or with multiple state slots: #[switch_to(State1, State2, ...)]

What it does:

  • overwrites the return type of the impl block generated by the #[require] macro