pub trait NamedTask: Future + Sized {
// Required methods
fn detail(self, detail: impl FnOnce() -> String + Send + 'static) -> Self;
fn external(self) -> Self;
}Expand description
What a named task offers beyond being a future. Bring it into scope to call
detail or external.
Without the control feature every future implements it and both methods return the
future unchanged. With control only [Named] does, so call them only on the value
TaskName::task returns.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".