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§
fn filter_map_ok<F, O2>(self, _: F) -> FilterMapOk<Self, F> ⓘ
fn filter_map_err<F, E2>(self, _: F) -> FilterMapErr<Self, F> ⓘ
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.