[][src]Trait legion_task::TaskComponent

pub trait TaskComponent<'a>: Send + Sync {
    type Data;
    fn run(&mut self, data: &mut Self::Data) -> bool;
}

An ephemeral component that needs access to Data to run some task. Will be run by run_tasks in a system with access to task_runner_query and Data.

Associated Types

type Data

Loading content...

Required methods

fn run(&mut self, data: &mut Self::Data) -> bool

Returns true iff the task is complete.

Loading content...

Implementors

Loading content...