Enum bevy_ecs::schedule::ShouldRun [−][src]
pub enum ShouldRun {
Yes,
No,
YesAndCheckAgain,
NoAndCheckAgain,
}
Expand description
Determines whether a system should be executed or not, and how many times it should be ran each time the stage is executed.
A stage will loop over its run criteria and systems until no more systems need to be executed and no more run criteria need to be checked.
- Any systems with run criteria that returns
Yes
will be ran exactly one more time during the stage’s execution that tick. - Any systems with run criteria that returns
No
are not ran for the rest of the stage’s execution that tick. - Any systems with run criteria that returns
YesAndCheckAgain
will be ran during this iteration of the loop. After all the systems that need to run are ran, that criteria will be checked again. - Any systems with run criteria that returns
NoAndCheckAgain
will not be ran during this iteration of the loop. After all the systems that need to run are ran, that criteria will be checked again.
Variants
Yes
Yes, the system should run one more time this tick.
No
No, the system should not run for the rest of this tick.
YesAndCheckAgain
Yes, the system should run, and after all systems in this stage have run, the criteria should be checked again. This will cause the stage to loop over the remaining systems and criteria this tick until they no longer need to be checked.
NoAndCheckAgain
No, the system should not run right now, but after all systems in this stage have run, the criteria should be checked again. This will cause the stage to loop over the remaining systems and criteria this tick until they no longer need to be checked.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ShouldRun
impl UnwindSafe for ShouldRun
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more