The Rust language has developed patterns to support control-flow effects like error handling, iteration, and asynchronous I/O. The Rust project is working on integrating these effects more deeply with each other, such as through async gen blocks. By connecting Rust’s patterns to the terminology and semantics of effects, it is possible to create an API pattern that can be applied to arbitrary combinations of effects. This pattern generalizes Rust’s existing Iterator and Future traits while remaining a zero-cost abstraction. The combination of effects in Rust forms a flat, unordered set, allowing programs to handle each effect uniformly and in isolation.
https://www.abubalay.com/blog/2024/01/14/rust-effect-lowering