pub trait TaskExt: Sized + Task {
// Provided methods
fn map<F, R>(self, mapper: F) -> Mapped<Self, F>
where F: FnOnce(Self::Output) -> R { ... }
fn with_context(self, context: TaskContext) -> ContextualTask<Self> { ... }
}Expand description
Extension methods for tasks.
Provided Methods§
Sourcefn with_context(self, context: TaskContext) -> ContextualTask<Self>
fn with_context(self, context: TaskContext) -> ContextualTask<Self>
Convert this task into a task with the given context.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".