ResultExt

Trait ResultExt 

Source
pub trait ResultExt<T, E> {
    // Required method
    fn or_collect<C>(self, collection: &mut C) -> Option<T>
       where C: Extend<E>;
}
Expand description

Helpers on Results.

Required Methods§

Source

fn or_collect<C>(self, collection: &mut C) -> Option<T>
where C: Extend<E>,

Consumes the error from the Result and pushes it into the provided collection.

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.

Implementations on Foreign Types§

Source§

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

Source§

fn or_collect<C>(self, collection: &mut C) -> Option<T>
where C: Extend<E>,

Implementors§