pub trait IterResult: Iterator<Item = Result<Self::Ok, Self::Error>> + Sized {
type Ok;
type Error;
// Provided methods
fn failfast(self) -> Fallible<Self, Option<Self::Error>> { ... }
fn ignore(self) -> Fallible<Self, Ignore> { ... }
fn accumulate(self) -> Fallible<Self, Vec<Self::Error>> { ... }
fn fallible<C: ErrorCollector<Self::Error>>(self) -> Fallible<Self, C> { ... }
fn with_collector<C: ErrorCollector<Self::Error>>(
self,
collector: C,
) -> Fallible<Self, C> { ... }
}Expand description
An extension trait implemented for all iterators of Result types.
Required Associated Types§
Provided Methods§
Sourcefn failfast(self) -> Fallible<Self, Option<Self::Error>>
fn failfast(self) -> Fallible<Self, Option<Self::Error>>
Produces a version of Fallible that stops iterating upon encountering the 1st error.
Sourcefn ignore(self) -> Fallible<Self, Ignore>
fn ignore(self) -> Fallible<Self, Ignore>
Produces a version of Fallible that keeps iterating and ignores all errors.
Sourcefn accumulate(self) -> Fallible<Self, Vec<Self::Error>>
fn accumulate(self) -> Fallible<Self, Vec<Self::Error>>
Produces a version of Fallible that keeps iterating and stores all errors in a Vec.
Sourcefn fallible<C: ErrorCollector<Self::Error>>(self) -> Fallible<Self, C>
fn fallible<C: ErrorCollector<Self::Error>>(self) -> Fallible<Self, C>
Produces a version of Fallible with a custom type of ErrorCollector
Sourcefn with_collector<C: ErrorCollector<Self::Error>>(
self,
collector: C,
) -> Fallible<Self, C>
fn with_collector<C: ErrorCollector<Self::Error>>( self, collector: C, ) -> Fallible<Self, C>
Produces a version of Fallible with an existing value of ErrorCollector
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".