Trait bones_lib::render::prelude::SystemStage
source · pub trait SystemStage: Sync + Send {
fn id(&self) -> Ulid;
fn name(&self) -> String;
fn run(&mut self, world: &mut World) -> Result<(), Error>;
fn initialize(&mut self, world: &mut World);
fn add_system(&mut self, system: System<()>);
}Expand description
Trait for system stages. A stage is a
Required Methods§
sourcefn name(&self) -> String
fn name(&self) -> String
The human-readable name for the stage, used for error messages when something goes wrong.
sourcefn run(&mut self, world: &mut World) -> Result<(), Error>
fn run(&mut self, world: &mut World) -> Result<(), Error>
Execute the systems on the given world.
Note: You must call
initialize()once before callingrun()one or more times.
sourcefn initialize(&mut self, world: &mut World)
fn initialize(&mut self, world: &mut World)
Initialize the contained systems for the given world.
Must be called once before calling run().
sourcefn add_system(&mut self, system: System<()>)
fn add_system(&mut self, system: System<()>)
Add a system to this stage.