pub trait FilterMap<O, E>: Sized {
    // Required methods
    fn filter_map_ok<F, O2>(self, _: F) -> FilterMapOk<Self, F> 
       where F: FnMut(O) -> Option<O2>;
    fn filter_map_err<F, E2>(self, _: F) -> FilterMapErr<Self, F> 
       where F: FnMut(E) -> Option<E2>;
}
Expand description

Extension trait for Iterator<Item = Result<O, E>> to selectively transform and map Oks and Errors.

Required Methods§

source

fn filter_map_ok<F, O2>(self, _: F) -> FilterMapOk<Self, F> where F: FnMut(O) -> Option<O2>,

source

fn filter_map_err<F, E2>(self, _: F) -> FilterMapErr<Self, F> where F: FnMut(E) -> Option<E2>,

Implementors§

source§

impl<I, O, E> FilterMap<O, E> for Iwhere I: Iterator<Item = Result<O, E>> + Sized,