[−][src]Trait parallel_stream::ParallelStream
Parallel version of the standard Stream
trait.
Associated Types
Loading content...Required methods
fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>>
Attempts to receive the next item from the stream.
Provided methods
fn map<F, T, Fut>(self, f: F) -> Map<T> where
F: FnMut(Self::Item) -> Fut + Send + Sync + Copy + 'static,
T: Send + 'static,
Fut: Future<Output = T> + Send,
F: FnMut(Self::Item) -> Fut + Send + Sync + Copy + 'static,
T: Send + 'static,
Fut: Future<Output = T> + Send,
Applies f
to each item of this stream in parallel, producing a new
stream with the results.
fn next(&mut self) -> NextFuture<Self>
Applies f
to each item of this stream in parallel, producing a new
stream with the results.
fn take(self, n: usize) -> Take<Self> where
Self: Sized,
Self: Sized,
Creates a stream that yields its first n
elements.
fn for_each<F, Fut>(self, f: F) -> ForEach where
F: FnMut(Self::Item) -> Fut + Send + Sync + Copy + 'static,
Fut: Future<Output = ()> + Send,
F: FnMut(Self::Item) -> Fut + Send + Sync + Copy + 'static,
Fut: Future<Output = ()> + Send,
Applies f
to each item of this stream in parallel.
Implementors
impl<S: ParallelStream> ParallelStream for Take<S>
[src]
type Item = S::Item
fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<S::Item>>
[src]
impl<S: Stream + Send + Sync + Unpin + 'static> ParallelStream for FromStream<S> where
S::Item: Send,
[src]
S::Item: Send,