Trait TaskSpawnExt

Source
pub trait TaskSpawnExt:
    Task
    + Send
    + Sized {
    // Required method
    fn spawn_blocking(self) -> JoinHandle<<Self as Task>::Output>;
}

Required Methods§

Source

fn spawn_blocking(self) -> JoinHandle<<Self as Task>::Output>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, O, E> TaskSpawnExt for T
where T: Task<Output = Result<O, E>> + Send + 'static, O: Send + 'static, E: Send + 'static,