Closed longshorej closed 4 years ago
This adds Flow::map_concat and Stream::map_concat which takes a function that consumes an A and produces an iterator of Bs.
Flow::map_concat
Stream::map_concat
A
B
This Bs are emitted serially until the iterator is exhausted, at which point upstream is pulled for another element.
This can be used to e.g. turn a Source<Vec<A>> into a Source<A>.
Source<Vec<A>>
Source<A>
This adds
Flow::map_concat
andStream::map_concat
which takes a function that consumes anA
and produces an iterator ofB
s.This
B
s are emitted serially until the iterator is exhausted, at which point upstream is pulled for another element.This can be used to e.g. turn a
Source<Vec<A>>
into aSource<A>
.