Trait ResultChain

Source
pub trait ResultChain<I, T, E, D> {
    // Required methods
    fn about(self, desc: D) -> Result<T, ErrorChain<I>>
       where Self: Sized,
             E: Into<I>,
             D: Into<Cow<'static, str>>;
    fn about_else(self, f: impl FnOnce() -> D) -> Result<T, ErrorChain<I>>
       where Self: Sized,
             E: Into<I>,
             D: Into<Cow<'static, str>>;
}

Required Methods§

Source

fn about(self, desc: D) -> Result<T, ErrorChain<I>>
where Self: Sized, E: Into<I>, D: Into<Cow<'static, str>>,

Source

fn about_else(self, f: impl FnOnce() -> D) -> Result<T, ErrorChain<I>>
where Self: Sized, E: Into<I>, D: Into<Cow<'static, str>>,

Implementations on Foreign Types§

Source§

impl<I, T, E> ResultChain<I, T, E, &'static str> for Result<T, E>

Source§

fn about(self, desc: &'static str) -> Result<T, ErrorChain<I>>
where Self: Sized, E: Into<I>,

Source§

fn about_else( self, f: impl FnOnce() -> &'static str, ) -> Result<T, ErrorChain<I>>
where Self: Sized, E: Into<I>,

Source§

impl<I, T, E> ResultChain<I, T, E, String> for Result<T, E>

Source§

fn about(self, desc: String) -> Result<T, ErrorChain<I>>
where Self: Sized, E: Into<I>,

Source§

fn about_else(self, f: impl FnOnce() -> String) -> Result<T, ErrorChain<I>>
where Self: Sized, E: Into<I>,

Implementors§