Skip to main contentCrate state_m
Source - Handle
- Data structure to store the latest state in responder’s state machine, can be used to do unsubscription.
- Reader
- Data structure to be exposed to do subscription by state change responders.
- Source
- State source, the initiator of state change.
- StateMachine
- State machine data structure to store state sources and handles.
- SourceChangeError
- HasStateHandle
- Define action upon state change event.
- HasStateMachine
- The trait defined basic methods to use state machine, usually you need a ‘Mutex<()>’ and a ‘StateMachine’ in your data structure.
- UseStateConvTarget
- Convenient method to do subscription with a state convert function. The trait is auto implemented for types implemented HasStateHandle.
- UseStateMachine
- Some convenient methods to use state machine. The trait is auto implemented for types implemented HasStateMachine.
- UseStateSource
- Convenient method to add state source to state machine. The trait is auto implemented for types implemented HasStateMachine.
- UseStateTarget
- Convenient method to do subscription. The trait is auto implemented for types implemented HasStateHandle.