Generators are still unstable, and generating streams requires complicated ownership handling, so this crate aims to enable ad-hoc generation of streams.

Current async implementations attempt to provide yield syntax via macros, but this is not transparent to IDEs at the time of this library's creation, so gen_z attempts to work in a way that IDEs understand.

rust gen_z(|mut z| async move { let awaited = bar().await; // Make awaitable calls in the generator z.send(awaited).await; // Streams do not support responses; `yield` has output `()` // Share yield helper with calls, allowing them to emit outputs while producing values let shared_result = baz(&mut z).await; z.send(foo + shared_result).await; // Return is infallible; if `Result` is needed, wrap calls to comply with TryStream }) // => Result is a futures::stream::Stream<Item = T>