System

Trait System 

Source
pub trait System: Component {
    // Required method
    fn run(&self, context: SystemContext<'_>) -> Result<(), Box<dyn Error>>;

    // Provided methods
    fn should_run(&self, context: SystemContext<'_>) -> bool { ... }
    fn try_run(&self, context: SystemContext<'_>) -> Result<(), Box<dyn Error>> { ... }
}

Required Methods§

Source

fn run(&self, context: SystemContext<'_>) -> Result<(), Box<dyn Error>>

Provided Methods§

Source

fn should_run(&self, context: SystemContext<'_>) -> bool

Source

fn try_run(&self, context: SystemContext<'_>) -> Result<(), Box<dyn Error>>

Implementors§

Source§

impl<T: Fn(SystemContext<'_>) -> Result<(), Box<dyn Error>> + Component> System for T

Source§

impl<const LOCKING: bool> System for ScriptedFunctionSystem<LOCKING>

Source§

impl<const LOCKING: bool> System for ScriptedObjectSystem<LOCKING>