rust-state-machines
Installation
SKILL.md
Rust State Machines
Use this when the real question is what the states are, what drives each transition, and which invalid combinations the representation should exclude.
Working stance
- Discover semantic states and transitions before choosing Rust syntax.
- Put state-specific data in the variant or type where that data is valid.
- Choose typestate or a runtime ADT according to who selects the transition.
- Give transitions semantic names and semantic result types.
- Encapsulate mandatory setup, cleanup, and finalization in the state owner.
- Keep genuinely independent observations as fields rather than inventing a state machine around them.