Skip to main content

Crate mddem_scheduler

Crate mddem_scheduler 

Source
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§

prelude

Structs§

CondMarker
ConditionalSystem
Wraps a system with a run condition. The system only runs when the condition returns true.
CurrentState
The currently active simulation state.
DescMarker
FnMarker
FunctionCondition
FunctionSystem
Local
Per-system local state. Persists across invocations of the same system instance. Initialized with T::default() on first access.
NextState
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.
SchedulerManager
Tracks the current run stage index and scheduler state (Setup/Run/End).
StoredSystemEntry
SystemDescriptor
Wraps a system with ordering metadata (label, before/after constraints).

Enums§

ScheduleSet
Execution phase within each timestep (run loop).
ScheduleSetupSet
Execution phase during one-time setup (before the run loop).
SchedulerState

Traits§

Condition
A DI-injected function that returns bool, used with .run_if().
IntoCondition
IntoScheduledSystem
Converts into a StoredSystemEntry (boxed system + optional ordering metadata).
IntoSystem
System
A runnable unit of work that receives resources via dependency injection.
SystemExt
Extension trait giving any IntoSystem implementor the .run_if(), .label(), .before(), and .after() fluent configuration methods.
SystemParam
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 at PostFinalIntegration.
in_state
Run condition: returns true when the current state equals target.
set_to_value
setup_set_to_value