pub trait IntoSystemConfig<Params>: IntoSystem<Params> + Sized {
// Required methods
fn after<S2, P2>(self, other: S2) -> SystemConfig<Self, Params>
where S2: IntoSystem<P2> + 'static;
fn before<S2, P2>(self, other: S2) -> SystemConfig<Self, Params>
where S2: IntoSystem<P2> + 'static;
fn priority(self, priority: i32) -> SystemConfig<Self, Params>;
}Expand description
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:
ⓘ
schedule
.add_system(spawn_enemies)
.add_system(move_enemies.after(spawn_enemies))
.add_system(render.after(move_enemies))
.add_system(hud.priority(10)); // runs before other unconstrained systemsRequired Methods§
Sourcefn after<S2, P2>(self, other: S2) -> SystemConfig<Self, Params>where
S2: IntoSystem<P2> + 'static,
fn after<S2, P2>(self, other: S2) -> SystemConfig<Self, Params>where
S2: IntoSystem<P2> + 'static,
Wraps this system with a constraint that it must run after other.
Sourcefn before<S2, P2>(self, other: S2) -> SystemConfig<Self, Params>where
S2: IntoSystem<P2> + 'static,
fn before<S2, P2>(self, other: S2) -> SystemConfig<Self, Params>where
S2: IntoSystem<P2> + 'static,
Wraps this system with a constraint that it must run before other.
Sourcefn priority(self, priority: i32) -> SystemConfig<Self, Params>
fn priority(self, priority: i32) -> SystemConfig<Self, Params>
Wraps this system with a priority — see SystemConfig::priority.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".