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, B, C> Zip for (A, B, C)where A: Stream, B: Stream, C: Stream,

§

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

§

type Stream = Zip3<A, B, C>

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,

§

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)

§

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

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,

§

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)

§

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

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,

§

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)

§

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

source§

fn zip(self) -> Self::Stream

source§

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

§

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

§

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

source§

fn zip(self) -> Self::Stream

source§

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

§

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

§

type Stream = Zip2<A, B>

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,

§

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)

§

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> 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,

§

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)

§

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

source§

fn zip(self) -> Self::Stream

source§

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

§

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

§

type Stream = Zip1<A>

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,

§

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)

§

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> 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,

§

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)

§

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

source§

fn zip(self) -> Self::Stream

source§

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

§

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

§

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

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,

§

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

§

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,

§

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

§

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

source§

fn zip(self) -> Self::Stream

Implementors§