pub struct Map<CS, F, FutT, T, FutB, B>where
CS: ConcurrentStream<Item = T, Future = FutT>,
F: Fn(T) -> FutB + Clone,
FutT: Future<Output = T>,
FutB: Future<Output = B>,{ /* private fields */ }
Expand description
Convert items from one type into another
Trait Implementations§
source§impl<CS, F, FutT, T, FutB, B> ConcurrentStream for Map<CS, F, FutT, T, FutB, B>where
CS: ConcurrentStream<Item = T, Future = FutT>,
F: Fn(T) -> FutB + Clone,
FutT: Future<Output = T>,
FutB: Future<Output = B>,
impl<CS, F, FutT, T, FutB, B> ConcurrentStream for Map<CS, F, FutT, T, FutB, B>where
CS: ConcurrentStream<Item = T, Future = FutT>,
F: Fn(T) -> FutB + Clone,
FutT: Future<Output = T>,
FutB: Future<Output = B>,
source§type Future = MapFuture<F, FutT, T, FutB, B>
type Future = MapFuture<F, FutT, T, FutB, B>
What’s the type of the future containing our items?
source§async fn drive<C>(self, consumer: C) -> C::Output
async fn drive<C>(self, consumer: C) -> C::Output
Internal method used to define the behavior of this concurrent iterator.
You should not need to call this directly. This method causes the
iterator self to start producing items and to feed them to the consumer
consumer one by one.
source§fn concurrency_limit(&self) -> Option<NonZeroUsize>
fn concurrency_limit(&self) -> Option<NonZeroUsize>
How much concurrency should we apply?
source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
How many items could we potentially end up returning?
source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates a stream which gives the current iteration count as well as
the next value. Read more
source§fn limit(self, limit: Option<NonZeroUsize>) -> Limit<Self>where
Self: Sized,
fn limit(self, limit: Option<NonZeroUsize>) -> Limit<Self>where
Self: Sized,
Obtain a simple pass-through adapter.
source§fn take(self, limit: usize) -> Take<Self>where
Self: Sized,
fn take(self, limit: usize) -> Take<Self>where
Self: Sized,
Creates a stream that yields the first
n
elements, or fewer if the
underlying iterator ends sooner.source§fn map<F, FutB, B>(
self,
f: F,
) -> Map<Self, F, Self::Future, Self::Item, FutB, B>
fn map<F, FutB, B>( self, f: F, ) -> Map<Self, F, Self::Future, Self::Item, FutB, B>
Convert items from one type into another
Auto Trait Implementations§
impl<CS, F, FutT, T, FutB, B> Freeze for Map<CS, F, FutT, T, FutB, B>
impl<CS, F, FutT, T, FutB, B> RefUnwindSafe for Map<CS, F, FutT, T, FutB, B>where
CS: RefUnwindSafe,
F: RefUnwindSafe,
FutT: RefUnwindSafe,
T: RefUnwindSafe,
FutB: RefUnwindSafe,
B: RefUnwindSafe,
impl<CS, F, FutT, T, FutB, B> Send for Map<CS, F, FutT, T, FutB, B>
impl<CS, F, FutT, T, FutB, B> Sync for Map<CS, F, FutT, T, FutB, B>
impl<CS, F, FutT, T, FutB, B> Unpin for Map<CS, F, FutT, T, FutB, B>
impl<CS, F, FutT, T, FutB, B> UnwindSafe for Map<CS, F, FutT, T, FutB, B>where
CS: UnwindSafe,
F: UnwindSafe,
FutT: UnwindSafe,
T: UnwindSafe,
FutB: UnwindSafe,
B: UnwindSafe,
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<S> IntoConcurrentStream for Swhere
S: ConcurrentStream,
impl<S> IntoConcurrentStream for Swhere
S: ConcurrentStream,
source§type Item = <S as ConcurrentStream>::Item
type Item = <S as ConcurrentStream>::Item
The type of the elements being iterated over.
source§type IntoConcurrentStream = S
type IntoConcurrentStream = S
Which kind of iterator are we turning this into?
source§fn into_co_stream(self) -> <S as IntoConcurrentStream>::IntoConcurrentStream
fn into_co_stream(self) -> <S as IntoConcurrentStream>::IntoConcurrentStream
Convert
self
into a concurrent iterator.