Skip to main content

BoxedResultExt

Trait BoxedResultExt 

Source
pub trait BoxedResultExt {
    type Success;

    // Required method
    fn or_erased(self) -> Result<Self::Success, Exn>;
}
Expand description

Extension methods for results containing an already boxed error.

This complements ResultExt, whose blanket implementation cannot accept boxed trait objects.

Required Associated Types§

Source

type Success

The Ok type.

Required Methods§

Source

fn or_erased(self) -> Result<Self::Success, Exn>

Type-erase the boxed error inside the Result.

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> BoxedResultExt for Result<T, Box<dyn Error + Send + Sync + 'static>>

Source§

type Success = T

Source§

fn or_erased(self) -> Result<Self::Success, Exn>

Implementors§