Skip to main content

Crate state_m

Crate state_m 

Source

Structs§

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.
ReaderEx
Data structure to be exposed to do subscription by state change responders, with the ability to convert the state to another type.
Source
State source, the initiator of state change.
StateMachine
State machine data structure to store state sources and handles.

Enums§

SourceChangeError

Traits§

HasLock
The data structure is locked while responding state change.
HasStateHandle
Define action upon state change event.
HasStateMachine
At least you should provide a state machine data structure.
UseStateHandle
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.