Skip to main content

System

Trait System 

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

Trait-object interface for all system types.

Required Methods§

Source

fn name(&self) -> &'static str

Human-readable system name (for diagnostics and conflict messages).

Source

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

Run the system against the world.

Source

fn access(&self) -> Vec<Access>

Declare what world data this system accesses.

Returns the union of all parameter accesses for parameterized systems.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§