BoxedResultExt

Trait BoxedResultExt 

Source
pub trait BoxedResultExt<T, E> {
    // Required methods
    fn ctx_boxed<C: IntoErrorContext>(self, msg: C) -> Self;
    fn ctx_boxed_with<F>(self, f: F) -> Self
       where F: FnOnce() -> String;
}
Expand description

Extension trait for adding context to already-boxed ComposableError results.

Required Methods§

Source

fn ctx_boxed<C: IntoErrorContext>(self, msg: C) -> Self

Adds additional context to an already-boxed ComposableError.

Source

fn ctx_boxed_with<F>(self, f: F) -> Self
where F: FnOnce() -> String,

Adds lazily-evaluated context to an already-boxed ComposableError.

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> BoxedResultExt<T, E> for Result<T, Box<ComposableError<E>>>

Source§

fn ctx_boxed<C: IntoErrorContext>(self, msg: C) -> Self

Source§

fn ctx_boxed_with<F>(self, f: F) -> Self
where F: FnOnce() -> String,

Implementors§