pub trait StreamExt: Stream {
    // Provided method
    fn flatten_switch(self) -> FlattenSwitch<Self>
       where Self::Item: Stream,
             Self: Sized { ... }
}
Expand description

An extension trait for the Stream trait that provides a variety of convenient combinator functions.

Provided Methods§

source

fn flatten_switch(self) -> FlattenSwitch<Self>where Self::Item: Stream, Self: Sized,

Flattens a stream of streams into just one continuous stream. Polls only the latest inner stream.

The stream terminates when the outer stream terminates.

This mirrors the behaviour of the Switch operator in ReactiveX.

Implementors§

source§

impl<T: Stream> StreamExt for T