pub struct DataSystemRegistration {
pub name: &'static str,
pub phase: TickPhase,
pub run: fn(&mut World, &Runtime, &mut OutputDeck),
pub order_hint: i32,
pub runs_after: &'static [&'static str],
}Expand description
Registration entry for a [DataSystem].
One entry per system, submitted via inventory::submit! at link time.
The dispatcher in khora-control discovers all entries, groups them by
TickPhase, topologically sorts within a phase using runs_after
(with order_hint as tie-breaker), and invokes them sequentially.
Fields§
§name: &'static strStable identifier — used for runs_after references and telemetry.
phase: TickPhasePhase this system belongs to.
run: fn(&mut World, &Runtime, &mut OutputDeck)The function to invoke on (&mut World, &Runtime, &mut OutputDeck).
- The
Runtimebundle lets a system fetch typed services / backends / resources it needs (EcsMaintenance,GraphicsDevice, …). - The
OutputDeckis the per-tick typed deck the lanes wrote into during the CLAD descent.Maintenance-phase systems usedeck.take::<MyWriteback>()to drain typed writeback slots and apply them to ECS components. Pre-scheduler phases receive an empty (transient) deck — systems that don’t need it just ignore the third arg.
order_hint: i32Tie-breaker used to order systems within a phase when no explicit
runs_after ordering applies. Lower runs first. Default 0.
runs_after: &'static [&'static str]Names of systems within the same phase that must run before this one. Used to topologically sort the phase. Empty by default.
Trait Implementations§
impl Collect for DataSystemRegistration
Auto Trait Implementations§
impl Freeze for DataSystemRegistration
impl RefUnwindSafe for DataSystemRegistration
impl Send for DataSystemRegistration
impl Sync for DataSystemRegistration
impl Unpin for DataSystemRegistration
impl UnsafeUnpin for DataSystemRegistration
impl UnwindSafe for DataSystemRegistration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more