futures_concurrency/stream/zip/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use futures_core::Stream;

pub(crate) mod array;
pub(crate) mod tuple;
#[cfg(feature = "alloc")]
pub(crate) mod vec;

/// ‘Zips up’ multiple streams into a single stream of pairs.
pub trait Zip {
    /// What's the return type of our stream?
    type Item;

    /// What stream do we return?
    type Stream: Stream<Item = Self::Item>;

    /// Combine multiple streams into a single stream.
    fn zip(self) -> Self::Stream;
}