pub trait SpawnHandleT {
    // Required methods
    fn spawn(
        &self,
        name: &'static str,
        task: impl Future<Output = ()> + Send + 'static
    );
    fn spawn_essential(
        &self,
        name: &'static str,
        task: impl Future<Output = ()> + Send + 'static
    ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send>>;
}
Expand description

Trait abstracting spawning tasks

Required Methods§

source

fn spawn( &self, name: &'static str, task: impl Future<Output = ()> + Send + 'static )

Run task

source

fn spawn_essential( &self, name: &'static str, task: impl Future<Output = ()> + Send + 'static ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send>>

Run an essential task

Object Safety§

This trait is not object safe.

Implementors§