pub trait StateSet: StateSetSealed {
const SET_DEPENDENCY_DEPTH: usize;
// Required methods
fn register_computed_state_systems_in_schedule<T>(schedule: &mut Schedule)
where T: ComputedStates<SourceStates = Self>;
fn register_sub_state_systems_in_schedule<T>(schedule: &mut Schedule)
where T: SubStates<SourceStates = Self>;
}Expand description
A States type or tuple of types which implement States.
This trait is used to allow implementors of States, as well
as tuples containing exclusively implementors of States, to
be used as ComputedStates::SourceStates.
It is sealed, and auto implemented for all States types and
tuples containing them.
Required Associated Constants§
Sourceconst SET_DEPENDENCY_DEPTH: usize
const SET_DEPENDENCY_DEPTH: usize
The total DEPENDENCY_DEPTH of all
the states that are part of this StateSet, added together.
Used to de-duplicate computed state executions and prevent cyclic computed states.
Required Methods§
Sourcefn register_computed_state_systems_in_schedule<T>(schedule: &mut Schedule)where
T: ComputedStates<SourceStates = Self>,
fn register_computed_state_systems_in_schedule<T>(schedule: &mut Schedule)where
T: ComputedStates<SourceStates = Self>,
Sets up the systems needed to compute T whenever any State in this
StateSet is changed.
Sourcefn register_sub_state_systems_in_schedule<T>(schedule: &mut Schedule)where
T: SubStates<SourceStates = Self>,
fn register_sub_state_systems_in_schedule<T>(schedule: &mut Schedule)where
T: SubStates<SourceStates = Self>,
Sets up the systems needed to compute whether T exists whenever any State in this
StateSet is changed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.