Trait ResultLiquidChainExt

Source
pub trait ResultLiquidChainExt<T> {
    // Required methods
    fn chain<S: Into<Cow<'static, str>>>(self, msg: S) -> Result<T>;
    fn chain_with<F>(self, msg: F) -> Result<T>
       where F: FnOnce() -> Cow<'static, str>;
}
Expand description

Result extension methods for adapting third party errors to Error.

Required Methods§

Source

fn chain<S: Into<Cow<'static, str>>>(self, msg: S) -> Result<T>

Create an Error with E as the cause.

Source

fn chain_with<F>(self, msg: F) -> Result<T>
where F: FnOnce() -> Cow<'static, str>,

Create an Error with E as the cause.

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> ResultLiquidChainExt<T> for Result<T, E>
where E: ErrorClone,

Source§

fn chain<S: Into<Cow<'static, str>>>(self, msg: S) -> Result<T>

Source§

fn chain_with<F>(self, msg: F) -> Result<T>
where F: FnOnce() -> Cow<'static, str>,

Implementors§