Skip to main content

Task

Trait Task 

Source
pub trait Task: Send + Sync {
    // Required methods
    fn id(&self) -> TaskId;
    fn name(&self) -> &str;

    // Provided method
    fn priority(&self) -> TaskPriority { ... }
}
Available on crate feature tasks and non-WebAssembly only.
Expand description

Core trait that all tasks must implement, providing identity and metadata.

Required Methods§

Source

fn id(&self) -> TaskId

Returns the unique identifier for this task instance.

Source

fn name(&self) -> &str

Returns the name of this task type.

Provided Methods§

Source

fn priority(&self) -> TaskPriority

Returns the priority of this task. Defaults to medium priority (5).

Implementors§