Skip to main content

System

Trait System 

Source
pub trait System:
    Send
    + Sync
    + 'static {
    // Required method
    fn is_mut(&self) -> bool;

    // Provided methods
    fn apply(&self, world: &World) { ... }
    fn apply_mut(&self, world: &mut World) { ... }
}
Expand description

System trait

Required Methods§

Source

fn is_mut(&self) -> bool

Whether this System takes a mutable reference to the World or not

Provided Methods§

Source

fn apply(&self, world: &World)

Apply the system on a reference to World

Source

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

Apply the system on a mutable reference to World

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§