Generators are currently unstable, but the crate genawaiter[1] allows you to use them on stable.
We have used that crate at work to replace a very scary and verbose state machine (which was generating a lot more code via procedural macros) with a much more succinct version.