Skip to main content

Task

Trait Task 

Source
pub trait Task: Send + 'static {
    // Required method
    fn run(self: Box<Self>);
}
Expand description

Runnable task accepted by executors.

Required Methods§

Source

fn run(self: Box<Self>)

Runs the task, consuming its boxed value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> Task for F
where F: FnOnce() + Send + 'static,