Skip to main content

ICResultCtxExt

Trait ICResultCtxExt 

Source
pub trait ICResultCtxExt<T, E> {
    // Required method
    fn inject<Kind>(self) -> Result<T, ICError<Kind>>
       where E: Into<Kind>;
}
Expand description

Extension trait for converting Result<T, ICError<E>> into Result<T, ICError<Kind>>, preserving the original span trace.

Prefer this over ICResultExt when the error is already an ICError.

Required Methods§

Source

fn inject<Kind>(self) -> Result<T, ICError<Kind>>
where E: Into<Kind>,

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> ICResultCtxExt<T, E> for Result<T, ICError<E>>

Source§

fn inject<Kind>(self) -> Result<T, ICError<Kind>>
where E: Into<Kind>,

Implementors§