pub fn zip_latest_with_all<I, F, T>(
    streams: I,
    combine: F
) -> ZipLatestWithAll<I::Item, F>where
    I: IntoIterator,
    I::Item: Stream + Unpin,
    F: FnMut(&[<I::Item as Stream>::Item]) -> T,
Expand description

Zips multiple streams using their latest values for the ones that are not ready

The zipped stream keeps the latest items produced by all streams. If one of the underlying streams is exhausted or not ready and at least one of the other streams yields a new item, it is combined with the latest items from the streams that did not yield anything new.

The zipped stream ends when all underlying streams end, or if one of the streams ends without ever producing an item.

Visually, this gives:

---0-----------1-----------------2-------> a
------10-------11-------12---------------> b
------10-------12-------13-------14------> zip_latest_with_all([a, b], |a, b| a + b)