Struct Map

Source
pub struct Map<I, F> { /* private fields */ }

Implementations§

Source§

impl<I, F> Map<I, F>

Source

pub fn new(inner: I, func: F) -> Map<I, F>

Trait Implementations§

Source§

impl<I: AsyncIterator, F, B> AsyncIterator for Map<I, F>
where F: FnMut(I::Item) -> B,

Source§

type Item = B

Source§

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

Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
Source§

fn awaited(self) -> Awaited<Self>
where Self: Sized, Self::Item: Future,

Source§

fn map<F, B>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Item) -> B, Self: Sized,

Source§

fn amap<F, B, O>(self, f: F) -> AsyncMap<Self, F>
where F: FnMut(Self::Item) -> O, O: Future<Output = B>, Self: Sized,

Source§

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Source§

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Source§

fn afilter<P, F>(self, predicate: P) -> AsyncFilter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> F, F: Future<Output = bool>,

Note: Read more
Source§

fn filter_map<F, B>(self, operation: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Source§

fn afilter_map<F, B, O>(self, operation: F) -> AsyncFilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> O, O: Future<Output = Option<B>>,

Source§

fn copied<'a, T>(self) -> Copied<Self>
where T: 'a + Copy, Self: Sized + AsyncIterator<Item = &'a T>,

Source§

fn cloned<'a, T>(self) -> Cloned<Self>
where T: 'a + Clone, Self: Sized + AsyncIterator<Item = &'a T>,

Source§

fn inspect<P>(self, op: P) -> Inspect<Self, P>
where Self: Sized, P: FnMut(&Self::Item),

Source§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Source§

fn flatten(self) -> Flatten<Self, Self::Item>
where Self: Sized, Self::Item: IntoAsyncIterator,

Source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoAsyncIterator, F: FnMut(Self::Item) -> U,

Source§

fn aflat_map<U, F, B>(self, f: F) -> AsyncFlatMap<Self, U, F, B>
where Self: Sized, U: IntoAsyncIterator, F: FnMut(Self::Item) -> B, B: Future<Output = U>,

Source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoAsyncIterator>::AsyncIter>
where Self: Sized, U: IntoAsyncIterator,

Source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
where Self: Sized, Self::Item: Clone,

Source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, G: FnMut() -> Self::Item,

Source§

fn aintersperse_with<G, F>(self, separator: G) -> AsyncIntersperseWith<Self, G>
where Self: Sized, G: FnMut() -> F, F: Future<Output = Self::Item>,

Source§

fn cycle(self) -> Cycle<Self>
where Self: Sized + Clone,

Source§

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Source§

fn atake_while<P, F>(self, predicate: P) -> AsyncTakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> F, F: Future<Output = bool>,

Note: Read more
Source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

Source§

fn ascan<St, B, F, O>(self, initial_state: St, f: F) -> AsyncScan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> O, O: Future<Output = Option<B>>,

Note: Read more
Source§

fn find<P>(&mut self, predicate: P) -> impl Future<Output = Option<Self::Item>>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Source§

fn afind<P, F>( &mut self, predicate: P, ) -> impl Future<Output = Option<Self::Item>>
where Self: Sized, P: FnMut(&Self::Item) -> F, F: Future<Output = bool>,

Source§

fn find_map<P, B>(&mut self, operation: P) -> impl Future<Output = Option<B>>
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Source§

fn afind_map<P, F, B>( &mut self, operation: P, ) -> impl Future<Output = Option<B>>
where Self: Sized, P: FnMut(Self::Item) -> F, F: Future<Output = Option<B>>,

Source§

fn collect<B>(self) -> impl Future<Output = B>
where B: FromAsyncIterator<Self::Item>, Self: Sized,

Source§

fn fold<B>( self, init: B, f: impl FnMut(B, Self::Item) -> B, ) -> impl Future<Output = B>
where Self: Sized,

Source§

fn afold<B, F>( self, init: B, f: impl FnMut(B, Self::Item) -> F, ) -> impl Future<Output = B>
where Self: Sized, F: Future<Output = B>,

Source§

fn for_each(self, f: impl FnMut(Self::Item)) -> impl Future<Output = ()>
where Self: Sized,

Source§

fn afor_each<F>( self, f: impl FnMut(Self::Item) -> F, ) -> impl Future<Output = ()>
where Self: Sized, F: Future<Output = ()>,

Source§

fn reduce( self, f: impl FnMut(Self::Item, Self::Item) -> Self::Item, ) -> impl Future<Output = Option<Self::Item>>
where Self: Sized,

Source§

fn areduce<F>( self, f: impl FnMut(Self::Item, Self::Item) -> F, ) -> impl Future<Output = Option<Self::Item>>
where Self: Sized, F: Future<Output = Self::Item>,

Source§

fn count(self) -> impl Future<Output = usize>
where Self: Sized,

Source§

fn all(self, f: impl FnMut(Self::Item) -> bool) -> impl Future<Output = bool>
where Self: Sized,

Source§

fn aall<F>(self, f: impl FnMut(Self::Item) -> F) -> impl Future<Output = bool>
where Self: Sized, F: Future<Output = bool>,

Source§

fn any(self, f: impl FnMut(Self::Item) -> bool) -> impl Future<Output = bool>
where Self: Sized,

Source§

fn aany<F>(self, f: impl FnMut(Self::Item) -> F) -> impl Future<Output = bool>
where Self: Sized, F: Future<Output = bool>,

Source§

impl<I: Clone, F: Clone> Clone for Map<I, F>

Source§

fn clone(&self) -> Map<I, F>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<I: AsyncIterator + Debug, F> Debug for Map<I, F>

Source§

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

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.