Trait petgraph::iter_utils::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.

Object Safety§

This trait is not object safe.

Implementors§

source§

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