pub trait Filter<O, E>: Sized {
// Required methods
fn filter_ok<F>(self, _: F) -> FilterOk<Self, F> ⓘ
where F: FnMut(&O) -> bool;
fn filter_err<F>(self, _: F) -> FilterErr<Self, F> ⓘ
where F: FnMut(&E) -> bool;
}Expand description
Extension trait for Iterator<Item = Result<O, E>> to filter one kind of result (and leaving the other as is)
Required Methods§
fn filter_ok<F>(self, _: F) -> FilterOk<Self, F> ⓘ
fn filter_err<F>(self, _: F) -> FilterErr<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.