Transition tables
Build tables fluently, then freeze them into a StateMachine:
#![allow(unused)] fn main() { use id_effect_fsm::{StateMachine, TransitionTable}; let table = TransitionTable::new() .on("idle", "start", "running") .on("running", "stop", "idle"); let mut m = StateMachine::new("idle", table); m.step("start")?; }
Missing edges return FsmError::NoTransition. Reset with StateMachine::reset or set state directly after loading a durable snapshot.