Function ordered_stream::join
source · pub fn join<A, B>(stream_a: A, stream_b: B) -> Join<A, B>where
A: OrderedStream,
B: OrderedStream<Data = A::Data, Ordering = A::Ordering>,
Expand description
Join two streams while preserving the overall ordering of elements.
You can think of this as implementing the “merge” step of a merge sort on the two streams,
producing a single stream that is sorted given two sorted streams. If the streams return
PollResult::NoneBefore
as intended, then the joined stream will be able to produce items
when only one of the sources has unblocked.