4 ms·
> This is also how generators and async functions actually work and where this problem often arises, so it's not a stretch to think about it like that. There i
by ______-_-______ 4y ago
> This is also how generators and async functions actually work and where this problem often arises, so it's not a stretch to think about it like that.
There is a crate that uses async functions to accomplish exactly this. https://crates.io/crates/escher https://crates.io/crates/escher
Disclaimer, I've never actually tried using it. I've used owning_ref or ouroboros depending on what I need.
- panstromek 4y agoThis is a really cool hack, I didn't know about that. It's another example showing that we really aren't conceptually that far from full fledged language support.