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

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

Takes multiple streams and creates a new stream over all in sequence.

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 chain(self) -> Self::Stream

Combine multiple streams into a single stream.

Implementations on Foreign Types§

source§

impl<S: Stream, const N: usize> Chain for [S; N]

§

type Item = <S as Stream>::Item

§

type Stream = Chain<S, N>

source§

fn chain(self) -> Self::Stream

source§

impl<S: Stream> Chain for Vec<S>

§

type Item = <S as Stream>::Item

§

type Stream = Chain<S>

source§

fn chain(self) -> Self::Stream

Implementors§