Pretty State Machine Patterns in Rust (hoverbear.org)