pub trait FbTryFutureExt: Future {
// Provided methods
fn try_shared(self) -> TryShared<Self>
where Self: TryFuture<Error = Error> + Sized,
<Self as TryFuture>::Ok: Clone { ... }
fn flatten_err<I, E1, E2>(
self,
) -> Map<Self, fn(Result<Result<I, E1>, E2>) -> Result<I, E1>>
where Self: Sized + Future<Output = Result<Result<I, E1>, E2>>,
E1: From<E2> { ... }
}Expand description
A trait implemented by default for all Futures which extends the standard functionality.
Provided Methods§
Create a cloneable handle to this future where all handles will resolve to the same result.
Similar to futures::future::Shared, but instead works on Futures returning Result where Err is anyhow::Error. This is achieved by storing anyhow::Error in std::sync::Arc.