Type Alias valence::ecs::system::RunSystem

pub type RunSystem = RunSystemWithInput<()>;
Expand description

The Command type for World::run_system.

This command runs systems in an exclusive and single threaded way. Running slow systems can become a bottleneck.

If the system needs an In<_> input value to run, use the RunSystemWithInput type instead.

There is no way to get the output of a system when run as a command, because the execution of the system happens later. To get the output of a system, use World::run_system or World::run_system_with_input instead of running the system as a command.

Aliased Type§

struct RunSystem { /* private fields */ }

Implementations

§

impl RunSystemWithInput<()>

pub fn new(system_id: SystemId) -> RunSystemWithInput<()>

Creates a new Command struct, which can be added to Commands

§

impl<I> RunSystemWithInput<I>
where I: 'static,

pub fn new_with_input(system_id: SystemId<I>, input: I) -> RunSystemWithInput<I>

Creates a new Command struct, which can be added to Commands in order to run the specified system with the provided In<_> input value.

Trait Implementations

§

impl<I> Clone for RunSystemWithInput<I>
where I: Clone + 'static,

§

fn clone(&self) -> RunSystemWithInput<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<I> Command for RunSystemWithInput<I>
where I: 'static + Send,

§

fn apply(self, world: &mut World)

Applies this command, causing it to mutate the provided world. Read more
§

impl<I> Debug for RunSystemWithInput<I>
where I: Debug + 'static,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more