Trait error_stack::future::FutureExt
source · [−]pub trait FutureExt: Future + Sized {
fn attach<A>(self, attachment: A) -> FutureWithAttachment<Self, A>ⓘNotable traits for FutureWithAttachment<Fut, T>impl<Fut, T> Future for FutureWithAttachment<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Send + Sync + 'static, type Output = Fut::Output;
where
A: Send + Sync + 'static;
fn attach_lazy<A, F>(
self,
attachment: F
) -> FutureWithLazyAttachment<Self, F>ⓘNotable traits for FutureWithLazyAttachment<Fut, F>impl<Fut, F, T> Future for FutureWithLazyAttachment<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Send + Sync + 'static, type Output = Fut::Output;
where
A: Send + Sync + 'static,
F: FnOnce() -> A;
fn attach_printable<A>(
self,
attachment: A
) -> FutureWithPrintableAttachment<Self, A>ⓘNotable traits for FutureWithPrintableAttachment<Fut, T>impl<Fut, T> Future for FutureWithPrintableAttachment<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
where
A: Display + Debug + Send + Sync + 'static;
fn attach_printable_lazy<A, F>(
self,
attachment: F
) -> FutureWithLazyPrintableAttachment<Self, F>ⓘNotable traits for FutureWithLazyPrintableAttachment<Fut, F>impl<Fut, F, T> Future for FutureWithLazyPrintableAttachment<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
where
A: Display + Debug + Send + Sync + 'static,
F: FnOnce() -> A;
fn change_context<C>(self, context: C) -> FutureWithContext<Self, C>ⓘNotable traits for FutureWithContext<Fut, T>impl<Fut, T> Future for FutureWithContext<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;
where
C: Context;
fn change_context_lazy<C, F>(
self,
context: F
) -> FutureWithLazyContext<Self, F>ⓘNotable traits for FutureWithLazyContext<Fut, F>impl<Fut, F, T> Future for FutureWithLazyContext<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;
where
C: Context,
F: FnOnce() -> C;
}
Available on crate feature
futures
only.Required Methods
fn attach<A>(self, attachment: A) -> FutureWithAttachment<Self, A>ⓘNotable traits for FutureWithAttachment<Fut, T>impl<Fut, T> Future for FutureWithAttachment<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Send + Sync + 'static, type Output = Fut::Output;
where
A: Send + Sync + 'static,
fn attach<A>(self, attachment: A) -> FutureWithAttachment<Self, A>ⓘNotable traits for FutureWithAttachment<Fut, T>impl<Fut, T> Future for FutureWithAttachment<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Send + Sync + 'static, type Output = Fut::Output;
where
A: Send + Sync + 'static,
Fut: Future,
Fut::Output: ResultExt,
T: Send + Sync + 'static, type Output = Fut::Output;
fn attach_lazy<A, F>(self, attachment: F) -> FutureWithLazyAttachment<Self, F>ⓘNotable traits for FutureWithLazyAttachment<Fut, F>impl<Fut, F, T> Future for FutureWithLazyAttachment<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Send + Sync + 'static, type Output = Fut::Output;
where
A: Send + Sync + 'static,
F: FnOnce() -> A,
fn attach_lazy<A, F>(self, attachment: F) -> FutureWithLazyAttachment<Self, F>ⓘNotable traits for FutureWithLazyAttachment<Fut, F>impl<Fut, F, T> Future for FutureWithLazyAttachment<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Send + Sync + 'static, type Output = Fut::Output;
where
A: Send + Sync + 'static,
F: FnOnce() -> A,
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Send + Sync + 'static, type Output = Fut::Output;
fn attach_printable<A>(
self,
attachment: A
) -> FutureWithPrintableAttachment<Self, A>ⓘNotable traits for FutureWithPrintableAttachment<Fut, T>impl<Fut, T> Future for FutureWithPrintableAttachment<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
where
A: Display + Debug + Send + Sync + 'static,
fn attach_printable<A>(
self,
attachment: A
) -> FutureWithPrintableAttachment<Self, A>ⓘNotable traits for FutureWithPrintableAttachment<Fut, T>impl<Fut, T> Future for FutureWithPrintableAttachment<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
where
A: Display + Debug + Send + Sync + 'static,
Fut: Future,
Fut::Output: ResultExt,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
fn attach_printable_lazy<A, F>(
self,
attachment: F
) -> FutureWithLazyPrintableAttachment<Self, F>ⓘNotable traits for FutureWithLazyPrintableAttachment<Fut, F>impl<Fut, F, T> Future for FutureWithLazyPrintableAttachment<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
where
A: Display + Debug + Send + Sync + 'static,
F: FnOnce() -> A,
fn attach_printable_lazy<A, F>(
self,
attachment: F
) -> FutureWithLazyPrintableAttachment<Self, F>ⓘNotable traits for FutureWithLazyPrintableAttachment<Fut, F>impl<Fut, F, T> Future for FutureWithLazyPrintableAttachment<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
where
A: Display + Debug + Send + Sync + 'static,
F: FnOnce() -> A,
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Display + Debug + Send + Sync + 'static, type Output = Fut::Output;
fn change_context<C>(self, context: C) -> FutureWithContext<Self, C>ⓘNotable traits for FutureWithContext<Fut, T>impl<Fut, T> Future for FutureWithContext<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;
where
C: Context,
fn change_context<C>(self, context: C) -> FutureWithContext<Self, C>ⓘNotable traits for FutureWithContext<Fut, T>impl<Fut, T> Future for FutureWithContext<Fut, T> where
Fut: Future,
Fut::Output: ResultExt,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;
where
C: Context,
Fut: Future,
Fut::Output: ResultExt,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;
fn change_context_lazy<C, F>(self, context: F) -> FutureWithLazyContext<Self, F>ⓘNotable traits for FutureWithLazyContext<Fut, F>impl<Fut, F, T> Future for FutureWithLazyContext<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;
where
C: Context,
F: FnOnce() -> C,
fn change_context_lazy<C, F>(self, context: F) -> FutureWithLazyContext<Self, F>ⓘNotable traits for FutureWithLazyContext<Fut, F>impl<Fut, F, T> Future for FutureWithLazyContext<Fut, F> where
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;
where
C: Context,
F: FnOnce() -> C,
Fut: Future,
Fut::Output: ResultExt,
F: FnOnce() -> T,
T: Context, type Output = Result<<Fut::Output as ResultExt>::Ok, T>;