futures_concurrency::stream

Trait Zip

source
pub trait Zip {
    type Item;
    type Stream: Stream<Item = Self::Item>;

    // Required method
    fn zip(self) -> Self::Stream;
}
Expand description

‘Zips up’ multiple streams into a single stream of pairs.

Required Associated Types§

source

type Item

What’s the return type of our stream?

source

type Stream: Stream<Item = Self::Item>

What stream do we return?

Required Methods§

source

fn zip(self) -> Self::Stream

Combine multiple streams into a single stream.

Implementations on Foreign Types§

source§

impl<A> Zip for (A,)
where A: Stream,

source§

type Item = (<A as Stream>::Item,)

source§

type Stream = Zip1<A>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B> Zip for (A, B)
where A: Stream, B: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item)

source§

type Stream = Zip2<A, B>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C> Zip for (A, B, C)
where A: Stream, B: Stream, C: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item)

source§

type Stream = Zip3<A, B, C>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D> Zip for (A, B, C, D)
where A: Stream, B: Stream, C: Stream, D: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item)

source§

type Stream = Zip4<A, B, C, D>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E> Zip for (A, B, C, D, E)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item)

source§

type Stream = Zip5<A, B, C, D, E>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E, F> Zip for (A, B, C, D, E, F)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream, F: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item, <F as Stream>::Item)

source§

type Stream = Zip6<A, B, C, D, E, F>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E, F, G> Zip for (A, B, C, D, E, F, G)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream, F: Stream, G: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item, <F as Stream>::Item, <G as Stream>::Item)

source§

type Stream = Zip7<A, B, C, D, E, F, G>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E, F, G, H> Zip for (A, B, C, D, E, F, G, H)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream, F: Stream, G: Stream, H: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item, <F as Stream>::Item, <G as Stream>::Item, <H as Stream>::Item)

source§

type Stream = Zip8<A, B, C, D, E, F, G, H>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E, F, G, H, I> Zip for (A, B, C, D, E, F, G, H, I)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream, F: Stream, G: Stream, H: Stream, I: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item, <F as Stream>::Item, <G as Stream>::Item, <H as Stream>::Item, <I as Stream>::Item)

source§

type Stream = Zip9<A, B, C, D, E, F, G, H, I>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E, F, G, H, I, J> Zip for (A, B, C, D, E, F, G, H, I, J)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream, F: Stream, G: Stream, H: Stream, I: Stream, J: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item, <F as Stream>::Item, <G as Stream>::Item, <H as Stream>::Item, <I as Stream>::Item, <J as Stream>::Item)

source§

type Stream = Zip10<A, B, C, D, E, F, G, H, I, J>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E, F, G, H, I, J, K> Zip for (A, B, C, D, E, F, G, H, I, J, K)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream, F: Stream, G: Stream, H: Stream, I: Stream, J: Stream, K: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item, <F as Stream>::Item, <G as Stream>::Item, <H as Stream>::Item, <I as Stream>::Item, <J as Stream>::Item, <K as Stream>::Item)

source§

type Stream = Zip11<A, B, C, D, E, F, G, H, I, J, K>

source§

fn zip(self) -> Self::Stream

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> Zip for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: Stream, B: Stream, C: Stream, D: Stream, E: Stream, F: Stream, G: Stream, H: Stream, I: Stream, J: Stream, K: Stream, L: Stream,

source§

type Item = (<A as Stream>::Item, <B as Stream>::Item, <C as Stream>::Item, <D as Stream>::Item, <E as Stream>::Item, <F as Stream>::Item, <G as Stream>::Item, <H as Stream>::Item, <I as Stream>::Item, <J as Stream>::Item, <K as Stream>::Item, <L as Stream>::Item)

source§

type Stream = Zip12<A, B, C, D, E, F, G, H, I, J, K, L>

source§

fn zip(self) -> Self::Stream

source§

impl<S> Zip for Vec<S>
where S: IntoStream,

source§

impl<S, const N: usize> Zip for [S; N]
where S: IntoStream,

source§

type Item = <Zip<<S as IntoStream>::IntoStream, N> as Stream>::Item

source§

type Stream = Zip<<S as IntoStream>::IntoStream, N>

source§

fn zip(self) -> Self::Stream

Implementors§