Skip to main content

CollectError

Trait CollectError 

Source
pub trait CollectError<T, E> {
    // Required method
    fn collect_err(self, collector: &mut ErrorCollector<E>) -> Option<T>;
}
Expand description

Extension trait for Result types to collect errors

Required Methods§

Source

fn collect_err(self, collector: &mut ErrorCollector<E>) -> Option<T>

Collect an error into an ErrorCollector if the result is an error

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E> CollectError<T, E> for Result<T, E>

Source§

fn collect_err(self, collector: &mut ErrorCollector<E>) -> Option<T>

Implementors§