Trait futures_concurrency::stream::StreamExt
source · pub trait StreamExt: Stream {
// Required methods
fn merge<T, S2>(self, other: S2) -> Merge2<T, Self, S2::IntoStream>
where Self: Stream<Item = T> + Sized,
S2: IntoStream<Item = T>;
fn chain<T, S2>(self, other: S2) -> Chain2<Self, S2::IntoStream>
where Self: Stream<Item = T> + Sized,
S2: IntoStream<Item = T>;
fn zip<T, S2>(self, other: S2) -> Zip2<Self, S2::IntoStream>
where Self: Stream<Item = T> + Sized,
S2: IntoStream<Item = T>;
}
Expand description
An extension trait for the Stream
trait.
Required Methods§
sourcefn merge<T, S2>(self, other: S2) -> Merge2<T, Self, S2::IntoStream>where
Self: Stream<Item = T> + Sized,
S2: IntoStream<Item = T>,
fn merge<T, S2>(self, other: S2) -> Merge2<T, Self, S2::IntoStream>where Self: Stream<Item = T> + Sized, S2: IntoStream<Item = T>,
Combines two streams into a single stream of all their outputs.
sourcefn chain<T, S2>(self, other: S2) -> Chain2<Self, S2::IntoStream>where
Self: Stream<Item = T> + Sized,
S2: IntoStream<Item = T>,
fn chain<T, S2>(self, other: S2) -> Chain2<Self, S2::IntoStream>where Self: Stream<Item = T> + Sized, S2: IntoStream<Item = T>,
Takes two streams and creates a new stream over all in sequence
sourcefn zip<T, S2>(self, other: S2) -> Zip2<Self, S2::IntoStream>where
Self: Stream<Item = T> + Sized,
S2: IntoStream<Item = T>,
fn zip<T, S2>(self, other: S2) -> Zip2<Self, S2::IntoStream>where Self: Stream<Item = T> + Sized, S2: IntoStream<Item = T>,
‘Zips up’ multiple streams into a single stream of pairs.