pub trait OnceTask: Send + Sync {
// Required methods
fn execute_once(self: Box<Self>, ctx: &TaskContext) -> Result<()>;
fn name(&self) -> &str;
fn priority(&self) -> Priority;
}Expand description
Trait for one-time tasks that consume themselves on execution
Unlike SchedulableTask which uses &self and can be executed multiple times,
OnceTask takes ownership via Box<Self> and is consumed on execution.
This allows tasks to own and transfer data without wrapping in Arc/Mutex.