Skip to main content

System

Trait System 

Source
pub trait System:
    Send
    + Sync
    + 'static {
    // Required methods
    fn run(&mut self, world: &mut World);
    fn name(&self) -> &str;
}
Expand description

A unit of logic operating on the World.

Required Methods§

Source

fn run(&mut self, world: &mut World)

Executes the system.

Source

fn name(&self) -> &str

Human-readable name.

Implementors§

Source§

impl<F: FnMut(&mut World) + Send + Sync + 'static> System for FunctionSystem<F>