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§
Provided Methods§
Sourcefn priority(&self) -> TaskPriority
fn priority(&self) -> TaskPriority
Returns the priority of this task. Defaults to medium priority (5).