For code that returns one of multiple Streams it'd be nice to have future::Either also impl Stream.
fn foo() -> impl Stream {
let v = match some_result {
Ok(v) => v,
Err(err) => return Either::A(stream::once(Err(err))),
};
return Either::B(some_stream(v));
}
Sounds like a good idea to me!
Hi. Can this be backported to 0.1 to as well? benefits tokio users
@tekjar I've cherry picked it and made #1682
Thanks @Kixunil
Most helpful comment
Hi. Can this be backported to 0.1 to as well? benefits tokio users