I started off by doing that, but ultimately didn't like it for my use cases.
* It didn't seem to grant a lot of benefits over pattern matching (errors were pushed to compile time checks in both cases).
* It had larger cognitive overhead since the allowed transitions were either all over the place in the source instead of in one match statement or weren't colocated with their structs.
* It didn't seem nearly as good at attacking the combinatorial complexity you see in these matrices as pattern matching is.
It's definitely not a great fit if you have a ton of different state transitions, since the From impls add a lot of boiler plate. But I've found it perfect for situations where there's only a few very well defined transitions, like the Raft implementation suggested in the blog post I linked in parent reply.
* It didn't seem to grant a lot of benefits over pattern matching (errors were pushed to compile time checks in both cases).
* It had larger cognitive overhead since the allowed transitions were either all over the place in the source instead of in one match statement or weren't colocated with their structs.
* It didn't seem nearly as good at attacking the combinatorial complexity you see in these matrices as pattern matching is.