Trait IterUtilsExt

Source
pub trait IterUtilsExt: Iterator {
    // Provided methods
    fn ex_find_map<F, R>(&mut self, f: F) -> Option<R>
       where F: FnMut(Self::Item) -> Option<R> { ... }
    fn ex_rfind_map<F, R>(&mut self, f: F) -> Option<R>
       where F: FnMut(Self::Item) -> Option<R>,
             Self: DoubleEndedIterator { ... }
}

Provided Methods§

Source

fn ex_find_map<F, R>(&mut self, f: F) -> Option<R>
where F: FnMut(Self::Item) -> Option<R>,

Return the first element that maps to Some(_), or None if the iterator was exhausted.

Source

fn ex_rfind_map<F, R>(&mut self, f: F) -> Option<R>
where F: FnMut(Self::Item) -> Option<R>, Self: DoubleEndedIterator,

Return the last element from the back that maps to Some(_), or None if the iterator was exhausted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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