Expand description
Macros§
- add_
fallible_ state_ machine - Generates a fallible state machine from a given state machine definition with error handling.
- add_
messages - Generates code to push messages into states or poll messages from states.
- add_
state_ machine - Generates a state machine from a given state machine definition.
- derive_
state - Derives an empty implementation of the state.
- derive_
transition - Derives an empty transition of a transition from one state into another and allows to customise if it should always transit or never.
- derive_
transition_ into - Derives an a implementation of the into trait for the transition if the target state does not contains any members
- derive_
transition_ into_ default - Derives an empty a implementation fo the into trait for the transition if the target state
implements the
Default
trait. - derive_
try_ state - Derives an empty implementation of the TryState.
- derive_
try_ transition - Derives an empty transition of a transition from one state into another and allows to customise if it should always transit or never.
- match_
state_ entry - Generate the enum entry of a state. Expects the name of the sfsm and the name (and type args) of the state as well as the desired name of the variable to work with as arguments. Can be used to generate match branches for example.
Attribute Macros§
- sfsm_
trace - Creates a wrapper around a log function to forward the logs to.
With the help of
sfsm_trace
, a logger function to which all logs from the state machine are forwarded to can be configured