Trait process_results::errors::ErrorCollector [−][src]
pub trait ErrorCollector<E> {
type Collection;
fn empty() -> Self;
fn push_err(&mut self, err: E) -> ControlFlow;
fn with_value<T>(self, val: T) -> Result<T, Self::Collection>;
}Expand description
Determines the manner in which the encountered error(s) are processed, stored and returned, as well as whether the iteration should continue or not.
Associated Types
type Collection
type Collection
The type to be returned after the iteration has been stopped
Required methods
fn push_err(&mut self, err: E) -> ControlFlow
fn push_err(&mut self, err: E) -> ControlFlow
Processes an error. Returns an ControlFlow type indicating whether the iteration shall stop
or not.
fn with_value<T>(self, val: T) -> Result<T, Self::Collection>
fn with_value<T>(self, val: T) -> Result<T, Self::Collection>
Returns Ok(val) if the iteration run to completion, or an error collection of type
Self::Collection if error(s) were encountered.