[][src]Struct core::iter::MapWhile

#[must_use = "iterators are lazy and do nothing unless consumed"]pub struct MapWhile<I, P> { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (iter_map_while #68537)

recently added

An iterator that only accepts elements while predicate returns Some(_).

This struct is created by the map_while method on Iterator. See its documentation for more.

Trait Implementations

impl<I: Clone, P: Clone> Clone for MapWhile<I, P>[src]

impl<I: Debug, P> Debug for MapWhile<I, P>[src]

impl<B, I: Iterator, P> Iterator for MapWhile<I, P> where
    P: FnMut(I::Item) -> Option<B>, 

type Item = B

The type of the elements being iterated over.

Auto Trait Implementations

impl<I, P> Send for MapWhile<I, P> where
    I: Send,
    P: Send

impl<I, P> Sync for MapWhile<I, P> where
    I: Sync,
    P: Sync

impl<I, P> Unpin for MapWhile<I, P> where
    I: Unpin,
    P: Unpin

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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.