Skip to main content

Task

Trait Task 

Source
pub trait Task: Task + Sized {
    // Provided method
    fn with<R>(
        self,
        run: impl FnOnce() -> R,
    ) -> Result<(R, Self::Output), Start> { ... }
}
Expand description

Runs the parent locally and returns the worker’s output after its join.

Provided Methods§

Source

fn with<R>(self, run: impl FnOnce() -> R) -> Result<(R, Self::Output), Start>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Task> Task for T