# README
FSM状态机
使用方法:
- 定义State, Index表示当前状态,Outcome表示接收到Input时转换到的新状态;
- Outcome的
Action
,表示新状态的回调函数,这个回调可以返回一个新的Input,用于链式触发; - 使用
Define
来将State串联起来转换成状态机; - 使用
Spin
来输入值,开始流转状态机;
# Constants
No description provided by the author
# Structs
FSM is the main structure defining a Finite State Machine.
InvalidInputError indicates that an input was passed to an FSM which is not valid for its current state.
An Outcome describes the result of running an FSM.
A State describes one possible state of an FSM.
# Type aliases
An Action describes something an FSM will do.
ClashingStateError indicates that an attempt to define an FSM where two states share the same index was made.
ImpossibleStateError indicates that an FSM is in a state which wasn't part of its definition.
An Input to give to an FSM.