demux-stream

Demultiplex streams of sum types into separate streams (e.g. Stream<Coprod!(A, B, ...)> -> Hlist![Stream<A>, Stream<B>, ...]).

```rust use demux_stream::demux3; use frunk::{Coprod, Hlist}; use futures::stream; use tokio::{stream::StreamExt, sync::mpsc::UnboundedReceiver};

let coproduct = , UnboundedReceiver, UnboundedReceiver ] = demux3(stream::iter(vec![coproduct]));

asserteq!(streams.head.next().await, None); asserteq!(streams.tail.head.next().await, Some(123)); assert_eq!(streams.tail.tail.head.next().await, None); ```