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.
Implementations§
Trait Implementations§
source§impl IntoRunCriteria<Box<dyn System<Out = ShouldRun, In = ()> + 'static, Global>> for BoxedSystem<(), ShouldRun>
impl IntoRunCriteria<Box<dyn System<Out = ShouldRun, In = ()> + 'static, Global>> for BoxedSystem<(), ShouldRun>
fn into(self) -> RunCriteriaDescriptorOrLabel
source§impl RunCriteriaDescriptorCoercion<()> for BoxedSystem<(), ShouldRun>
impl RunCriteriaDescriptorCoercion<()> for BoxedSystem<(), ShouldRun>
source§fn label(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
fn label(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
source§fn label_discard_if_duplicate(
self,
label: impl RunCriteriaLabel
) -> RunCriteriaDescriptor
fn label_discard_if_duplicate(
self,
label: impl RunCriteriaLabel
) -> RunCriteriaDescriptor
source§fn before(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
fn before(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
source§fn after(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
fn after(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
impl Copy for ShouldRun
impl Eq for ShouldRun
impl StructuralEq for ShouldRun
impl StructuralPartialEq for ShouldRun
Auto Trait Implementations§
impl RefUnwindSafe for ShouldRun
impl Send for ShouldRun
impl Sync for ShouldRun
impl Unpin for ShouldRun
impl UnwindSafe for ShouldRun
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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 moresource§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more