async-stream icon indicating copy to clipboard operation
async-stream copied to clipboard

Asynchronous streams for Rust using async & await notation

Results 25 async-stream issues
Sort by recently updated
recently updated
newest added
trafficstars

Example usage: ```rs let s = stream(|stream| async move { for i in 0..3 { stream.yield_item(i).await; } }); ``` Advantages of using the new API: 1. Type annotations with `stream::`...

I've been thinking that it would be possible for this crate to provide an API that doesn't use proc macros at all, which has a couple of benefits: * IDEs...

Take a simple example like ```rust fn main() { let s = async_stream::stream! { for i in 0..3 { yield i; } }; } ``` in a new rust project....

1. MutexGuard ```rs try_stream! { { let _guard = mutex.try_lock().unwrap(); Err(200)?; } { yield 100; } } ``` `Err(200)?` is expanded by try_stream! to something like `__yield_tx.send(::core::result::Result::Err(200).await;` This makes the...

I have multiple streams I am joining in a select along with a timeout future that caused me to run into this. I tried to boil it down to a...

For streams that never `yield`, the implementation forces the `Item` type to be inferred as `()` with a `yield` that never occurs. This has the consequence of making it impossible...

#53 was reverted in #55, but I'd like to consider re-landing it in the next major version. https://github.com/tokio-rs/async-stream/pull/55#issue-594667613 > #53 contained improvements, but at the same time caused breaking changes....

Often I get compile errors when the compiler cannot deduce the type when using `try_stream!`: ``` error[E0698]: type inside `async fn` body must be known in this context --> src/server.rs:213:18...

Requiring `pin_mut!(s);` at the usage site may be efficient, but it is an awkward requirement for users of such API. I've found that wrapping returned stream in `Box::pin` makes it...