If I am now writing my own runtime / eventloop to advance my state machine anyway, what exactly am I getting from doing that through an abstraction like the Generator trait?
On top of that, the resume and yield abstraction can get convoluted because a lot of times, you only want to do one or the other, meaning either case needs to support a no-op because a single `yield` always does both.
Lastly, with all input going through a single type, your state machine then needs to handle every possible input at every yield point. That is a lot of `match` statements and branching.
I am sure there are better ways to do this and having generators to express custom iterators would be amazing. But for generic state machines, I don't see much of a benefit.
At some point maybe the ergonomics get so bad that you are just better off writing the state machine manually.
The ergonomics of this could be made reasonably friendly if your completeness checker can narrow down the set of admissible matches a la "GADTs meet their match". A single R sum type, but the compiler only makes you handle the cases that can occur at each poll() site