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: Debug, F: Debug> Debug for Map<I, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, F, B, Fut> Iterator for Map<I, F>
where I: Iterator, F: FnMut(I::Item) -> Fut, Fut: Future<Output = B>,

§

type Item = B

The type of the elements being iterated over.
source§

async fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value.
source§

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,

Takes a closure and creates an iterator which calls that closure on each element.
source§

async fn collect<B: FromIterator<Self::Item>>(self) -> B
where Self: Sized,

Transforms an iterator into a collection.
source§

fn lend(self) -> Lend<Self>
where Self: Sized,

Creates an iterator which yields a reference to self as well as the next value.
source§

fn lend_mut(self) -> LendMut<Self>
where Self: Sized,

Creates an iterator which yields a mutable reference to self as well as the next value.

Auto Trait Implementations§

§

impl<I, F> Freeze for Map<I, F>
where I: Freeze, F: Freeze,

§

impl<I, F> RefUnwindSafe for Map<I, F>

§

impl<I, F> Send for Map<I, F>
where I: Send, F: Send,

§

impl<I, F> Sync for Map<I, F>
where I: Sync, F: Sync,

§

impl<I, F> Unpin for Map<I, F>
where I: Unpin, F: Unpin,

§

impl<I, F> UnwindSafe for Map<I, F>
where I: UnwindSafe, F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<I> IntoIterator for I
where I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
source§

async fn into_iter(self) -> I

Creates an iterator from a value.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.