pub trait Handle<T>: Future<Output = T>where
T: 'static,{
// Required method
fn detach(self);
}Expand description
Task handle trait.
This handle is used to receive result from the task, as well as controlling the task like cancelling and detaching it:
- Awaiting this handle receives the result.
- Dropping this handle cancels the task.
- Calling
detachconsumes and detaches the task.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".