Skip to main content

Module system_param

Module system_param 

Source

Structs§

FunctionSystem
Wraps a plain function into a System, holding its per-call SystemParam::State between runs.
SystemChain
A sequence of systems built with Chain::chain — e.g. (spawn_enemies, move_enemies, render).chain() — that forces each system to run strictly after the one before it in the tuple, on top of whatever .after(...)/.before(...)/.priority(...) is applied to the chain as a whole. Register it with Schedule::add_systems (not add_system — a chain is more than one system).
SystemConfig
A system bundled with .after(...)/.before(...) ordering constraints and a .priority(...), produced by IntoSystemConfig and consumed by Schedule::add_system.

Traits§

Chain
Lets .chain() be called on a tuple of 2 or more systems to force them to run in that exact relative order within a Schedule, regardless of the order they (or other unrelated systems) are added in:
IntoSystem
Implemented for any function whose parameters are all SystemParams — this is what lets a plain fn my_system(time: Read<Time>) be passed directly to add_system.
IntoSystemConfig
Lets .after(...)/.before(...)/.priority(...) be called directly on a system — a plain function, closure, or anything else IntoSystem is implemented for — to declare where it must run relative to another system in the same Schedule, or how it should be prioritized against unconstrained systems:
System
A runnable system — the type-erased form IntoSystem produces, so different systems (different parameter lists) can live in the same Vec<Box<dyn System>>.
SystemParam
Anything that can be fetched as a system function parameter — implemented for Read/Write, Query, Local, Commands, tuples of SystemParams (so a function can take several), and a few others. You generally don’t implement this yourself unless you’re adding a new kind of parameter.