This repo is for a rust crate that offers a futures::Stream extension
trait which allows for splitting a Stream into two streams using a
predicate function thats checked on each Stream::Item.
use SplitStreamByExt;
let incoming_stream = iter;
let = incoming_stream.split_by;
spawn;
while let Some = odd_stream.next.await
A more advanced usage uses split_by_map which allows for extracting
values while splitting
use ;
let incoming_stream = iter;
let = incoming_stream.split_by_map;
spawn;
while let Some = response_stream.next.await
In its current implementation, it only buffers up to one element in the scenario where the stream that requests the next item is not the one that matches the predicate. In the future, this might be changed to be configurable using a const generic parameter