Struct async_iterator::Map
source · pub struct Map<I, F> { /* private fields */ }
Expand description
An iterator that maps value of another stream with a function.
Trait Implementations§
source§impl<I, F, B, Fut> Iterator for Map<I, F>where
I: Iterator,
F: FnMut(I::Item) -> Fut,
Fut: Future<Output = B>,
impl<I, F, B, Fut> Iterator for Map<I, F>where I: Iterator, F: FnMut(I::Item) -> Fut, Fut: Future<Output = B>,
source§async fn next(&mut self) -> Option<Self::Item>
async fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value.
source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator.
source§fn map<B, F>(self, f: F) -> Map<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> B,
fn map<B, F>(self, f: F) -> Map<Self, F>where Self: Sized, F: FnMut(Self::Item) -> B,
Takes a closure and creates an iterator which calls that closure on each element.
source§async fn collect<B: FromIterator<Self::Item>>(self) -> Bwhere
Self: Sized,
async fn collect<B: FromIterator<Self::Item>>(self) -> Bwhere Self: Sized,
Transforms an iterator into a collection.
Auto Trait Implementations§
impl<I, F> RefUnwindSafe for Map<I, F>where F: RefUnwindSafe, I: RefUnwindSafe,
impl<I, F> Send for Map<I, F>where F: Send, I: Send,
impl<I, F> Sync for Map<I, F>where F: Sync, I: Sync,
impl<I, F> Unpin for Map<I, F>where F: Unpin, I: Unpin,
impl<I, F> UnwindSafe for Map<I, F>where F: UnwindSafe, I: 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