pub trait Task<Out>: Futurewhere
Out: Send + 'static,{
// Required methods
fn output<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Out> + Send + 'async_trait>>
where Self: 'async_trait;
fn detach(self);
fn drop(self);
}Expand description
Trait representing an async task that can be awaited.
This trait combines the Future trait with methods for managing task lifecycle.
§Type Parameters
Out- The output type of the task