TryFutureExt

Trait TryFutureExt 

Source
pub trait TryFutureExt<T, E>: Sized {
    // Provided method
    fn map_err<F, M>(self, map: M) -> MapErr<Self, M> 
       where M: FnOnce(E) -> F { ... }
}
Expand description

Extension methods for futures that return a result.

Provided Methods§

Source

fn map_err<F, M>(self, map: M) -> MapErr<Self, M>
where M: FnOnce(E) -> F,

Returns a new future that converts the error by applying a function.

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.

Implementors§

Source§

impl<F, T, E> TryFutureExt<T, E> for F
where F: TryFuture<T, E>,