pub struct Map<T> { /* private fields */ }
Expand description
A parallel stream that maps value of another stream with a function.
Implementations§
Trait Implementations§
Source§impl<T: Send + 'static> ParallelStream for Map<T>
impl<T: Send + 'static> ParallelStream for Map<T>
Source§fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Item>>
fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>
Attempts to receive the next item from the stream.
Source§fn map<F, T, Fut>(self, f: F) -> Map<T>
fn map<F, T, Fut>(self, f: F) -> Map<T>
Applies
f
to each item of this stream in parallel, producing a new
stream with the results.Source§fn next(&mut self) -> NextFuture<'_, Self>
fn next(&mut self) -> NextFuture<'_, Self>
Applies
f
to each item of this stream in parallel, producing a new
stream with the results.Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Creates a stream that yields its first
n
elements.impl<'__pin, T> Unpin for Map<T>where
PinnedFieldsOf<__Origin<'__pin, T>>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for Map<T>
impl<T> RefUnwindSafe for Map<T>
impl<T> Send for Map<T>where
T: Send,
impl<T> Sync for Map<T>where
T: Send,
impl<T> UnwindSafe for Map<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<I> IntoParallelStream for Iwhere
I: ParallelStream,
impl<I> IntoParallelStream for Iwhere
I: ParallelStream,
Source§type Item = <I as ParallelStream>::Item
type Item = <I as ParallelStream>::Item
The type of the elements being iterated over.
Source§type IntoParStream = I
type IntoParStream = I
Which kind of stream are we turning this into?
Source§fn into_par_stream(self) -> I
fn into_par_stream(self) -> I
Creates a parallel stream from a value.