Skip to main content

Task

Trait Task 

Source
pub trait Task: 'static + Send {
    // Required method
    fn execute(&mut self, ctx: &mut ExecuteContext<impl Write>) -> Result<()>;

    // Provided method
    fn id(&self) -> String { ... }
}

Required Methods§

Source

fn execute(&mut self, ctx: &mut ExecuteContext<impl Write>) -> Result<()>

Execute the task

Provided Methods§

Source

fn id(&self) -> String

Get task id used in progress bar

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§