pub trait IterExt<T, E>: Iterator<Item = NullableResult<T, E>>where
Self: Sized,{
// Provided methods
fn filter_nulls(
self,
) -> FilterMap<Self, fn(NullableResult<T, E>) -> Option<Result<T, E>>> ⓘ { ... }
fn extract_and_find<P>(self, pred: P) -> NullableResult<T, E>
where P: FnMut(&T) -> Result<bool, E> { ... }
fn extract_and_find_map<F, U>(self, f: F) -> NullableResult<U, E>
where F: FnMut(T) -> NullableResult<U, E> { ... }
fn try_filter<P>(self, pred: P) -> TryFilter<Self, P, T, E> ⓘ
where P: FnMut(&T) -> bool { ... }
fn try_filter_map<F, U>(self, f: F) -> TryFilterMap<Self, F, T, U, E> ⓘ
where F: FnMut(T) -> Option<NullableResult<U, E>> { ... }
}
Expand description
Additional methods for iterators over NullableResult
Provided Methods§
Sourcefn filter_nulls(
self,
) -> FilterMap<Self, fn(NullableResult<T, E>) -> Option<Result<T, E>>> ⓘ
fn filter_nulls( self, ) -> FilterMap<Self, fn(NullableResult<T, E>) -> Option<Result<T, E>>> ⓘ
Filter out all the null values. Returns an iterator over Result<T, E>
.
Sourcefn extract_and_find<P>(self, pred: P) -> NullableResult<T, E>
fn extract_and_find<P>(self, pred: P) -> NullableResult<T, E>
Returns the first value that is an Err
or that the predicate accepts.
Sourcefn extract_and_find_map<F, U>(self, f: F) -> NullableResult<U, E>where
F: FnMut(T) -> NullableResult<U, E>,
fn extract_and_find_map<F, U>(self, f: F) -> NullableResult<U, E>where
F: FnMut(T) -> NullableResult<U, E>,
Sourcefn try_filter<P>(self, pred: P) -> TryFilter<Self, P, T, E> ⓘ
fn try_filter<P>(self, pred: P) -> TryFilter<Self, P, T, E> ⓘ
Returns an iterator that applies the predicate to each element and filters out the values for which it returns false.
Sourcefn try_filter_map<F, U>(self, f: F) -> TryFilterMap<Self, F, T, U, E> ⓘ
fn try_filter_map<F, U>(self, f: F) -> TryFilterMap<Self, F, T, U, E> ⓘ
Returns an iterator that both filters and maps.
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.