pub trait FutureExt: Future + Sized {
// Required methods
fn attach<A>(self, attachment: A) -> FutureWithAttachment<Self, A> ⓘ
where A: Attachment;
fn attach_with<A, F>(
self,
attachment: F,
) -> FutureWithLazyAttachment<Self, F> ⓘ
where A: Attachment,
F: FnOnce() -> A;
fn attach_lazy<A, F>(
self,
attachment: F,
) -> FutureWithLazyOpaqueAttachment<Self, F> ⓘ
where A: OpaqueAttachment,
F: FnOnce() -> A;
fn attach_opaque<A>(
self,
attachment: A,
) -> FutureWithOpaqueAttachment<Self, A> ⓘ
where A: OpaqueAttachment;
fn attach_opaque_with<A, F>(
self,
attachment: F,
) -> FutureWithLazyOpaqueAttachment<Self, F> ⓘ
where A: OpaqueAttachment,
F: FnOnce() -> A;
fn change_context<C>(self, context: C) -> FutureWithContext<Self, C> ⓘ
where C: Context;
fn change_context_lazy<C, F>(
self,
context: F,
) -> FutureWithLazyContext<Self, F> ⓘ
where C: Context,
F: FnOnce() -> C;
// Provided methods
fn attach_printable<A>(self, attachment: A) -> FutureWithAttachment<Self, A> ⓘ
where A: Attachment { ... }
fn attach_printable_lazy<A, F>(
self,
attachment: F,
) -> FutureWithLazyAttachment<Self, F> ⓘ
where A: Attachment,
F: FnOnce() -> A { ... }
}
Required Methods§
Sourcefn attach<A>(self, attachment: A) -> FutureWithAttachment<Self, A> ⓘwhere
A: Attachment,
fn attach<A>(self, attachment: A) -> FutureWithAttachment<Self, A> ⓘwhere
A: Attachment,
Sourcefn attach_with<A, F>(self, attachment: F) -> FutureWithLazyAttachment<Self, F> ⓘwhere
A: Attachment,
F: FnOnce() -> A,
fn attach_with<A, F>(self, attachment: F) -> FutureWithLazyAttachment<Self, F> ⓘwhere
A: Attachment,
F: FnOnce() -> A,
fn attach_lazy<A, F>(
self,
attachment: F,
) -> FutureWithLazyOpaqueAttachment<Self, F> ⓘwhere
A: OpaqueAttachment,
F: FnOnce() -> A,
👎Deprecated since 0.6.0: Use
attach_opaque_with
instead. attach_lazy
was renamed to attach_opaque_with
and attach_printable_lazy
was renamed to attach_with
Sourcefn attach_opaque<A>(self, attachment: A) -> FutureWithOpaqueAttachment<Self, A> ⓘwhere
A: OpaqueAttachment,
fn attach_opaque<A>(self, attachment: A) -> FutureWithOpaqueAttachment<Self, A> ⓘwhere
A: OpaqueAttachment,
Sourcefn attach_opaque_with<A, F>(
self,
attachment: F,
) -> FutureWithLazyOpaqueAttachment<Self, F> ⓘwhere
A: OpaqueAttachment,
F: FnOnce() -> A,
fn attach_opaque_with<A, F>(
self,
attachment: F,
) -> FutureWithLazyOpaqueAttachment<Self, F> ⓘwhere
A: OpaqueAttachment,
F: FnOnce() -> A,
Sourcefn change_context<C>(self, context: C) -> FutureWithContext<Self, C> ⓘwhere
C: Context,
fn change_context<C>(self, context: C) -> FutureWithContext<Self, C> ⓘwhere
C: Context,
Sourcefn change_context_lazy<C, F>(self, context: F) -> FutureWithLazyContext<Self, F> ⓘ
fn change_context_lazy<C, F>(self, context: F) -> FutureWithLazyContext<Self, F> ⓘ
Provided Methods§
fn attach_printable<A>(self, attachment: A) -> FutureWithAttachment<Self, A> ⓘwhere
A: Attachment,
👎Deprecated since 0.6.0: Use
attach
instead. attach
was renamed to attach_opaque
and attach_printable
was renamed to attach
fn attach_printable_lazy<A, F>(
self,
attachment: F,
) -> FutureWithLazyAttachment<Self, F> ⓘwhere
A: Attachment,
F: FnOnce() -> A,
👎Deprecated since 0.6.0: Use
attach_with
instead. attach_lazy
was renamed to attach_opaque_with
and attach_printable_lazy
was renamed to attach_with
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.