async-rs / async-rs/async-std

Feature Request: fork/split/broadcast/unzip/switch a Stream into two

Open
#706 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.1k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

I was wandering if we could have a method to `fork/split/broadcast/unzip/switch` a Stream into two Streams. We do have a `unzip` now, but it returns two container, which is not symmetric to `zip`.

`fn unzip() -> (LeftStream, RightStream) where Self: Stream<(L, R)>`

`fn switch(test: T => bool) -> (TrueStream, FalseStream)`

related works: #543

https://docs.rs/broadcaster/1.0.0/broadcaster/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.