Expand description
Dependency-injection scheduler with Res/ResMut resource access and ordered system execution.
Systems are plain functions whose parameters implement SystemParam. The scheduler resolves
resource indices at startup and executes systems in ScheduleSet order each timestep.
Modules§
Structs§
- Cond
Marker - Conditional
System - Wraps a system with a run condition. The system only runs when the condition returns true.
- Current
State - The currently active simulation state.
- Desc
Marker - FnMarker
- Function
Condition - Function
System - Local
- Per-system local state. Persists across invocations of the same system instance.
Initialized with
T::default()on first access. - Next
State - The next state to transition to at the end of the step. Set via
NextState::set(). - Res
- Shared immutable reference to resource
T, injected into systems. - ResMut
- Exclusive mutable reference to resource
T, injected into systems. - Scheduler
- Manages system registration, resource storage, ordering, and per-step execution.
- Scheduler
Manager - Tracks the current run stage index and scheduler state (Setup/Run/End).
- Stored
System Entry - System
Descriptor - Wraps a system with ordering metadata (label, before/after constraints).
Enums§
- Schedule
Set - Execution phase within each timestep (run loop).
- Schedule
Setup Set - Execution phase during one-time setup (before the run loop).
- Scheduler
State
Traits§
- Condition
- A DI-injected function that returns
bool, used with.run_if(). - Into
Condition - Into
Scheduled System - Converts into a
StoredSystemEntry(boxed system + optional ordering metadata). - Into
System - System
- A runnable unit of work that receives resources via dependency injection.
- System
Ext - Extension trait giving any
IntoSystemimplementor the.run_if(),.label(),.before(), and.after()fluent configuration methods. - System
Param - Types that can be injected as parameters into system functions.
Functions§
- apply_
state_ transitions - System that applies pending state transitions at end of step.
Register via
StatesPlugin<S>or manually atPostFinalIntegration. - in_
state - Run condition: returns true when the current state equals
target. - set_
to_ value - setup_
set_ to_ value