Trait FutResultChain

Source
pub trait FutResultChain<I, T, E, D> {
    // Required methods
    fn about<'async_trait>(
        self,
        desc: D,
    ) -> Pin<Box<dyn Future<Output = Result<T, ErrorChain<I>>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait,
             E: Into<I>,
             D: Into<Cow<'static, str>>;
    fn about_else<'async_trait>(
        self,
        f: impl 'async_trait + FnOnce() -> D + Send,
    ) -> Pin<Box<dyn Future<Output = Result<T, ErrorChain<I>>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait,
             E: Into<I>,
             D: Into<Cow<'static, str>>;
}

Required Methods§

Source

fn about<'async_trait>( self, desc: D, ) -> Pin<Box<dyn Future<Output = Result<T, ErrorChain<I>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, E: Into<I>, D: Into<Cow<'static, str>>,

Source

fn about_else<'async_trait>( self, f: impl 'async_trait + FnOnce() -> D + Send, ) -> Pin<Box<dyn Future<Output = Result<T, ErrorChain<I>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, E: Into<I>, D: Into<Cow<'static, str>>,

Implementors§

Source§

impl<I, T, E, F> FutResultChain<I, T, E, &'static str> for F
where F: Future<Output = Result<T, E>> + Send,

Source§

impl<I, T, E, F> FutResultChain<I, T, E, String> for F
where F: Future<Output = Result<T, E>> + Send,