bevy/crates/bevy_ecs/src/schedule
Christian Hughes 9c004439b8
Remove States::variants and remove enum-only restriction its derive (#9945)
# Objective

The `States::variants` method was once used to construct `OnExit` and
`OnEnter` schedules for every possible value of a given `States` type.
[Since the switch to lazily initialized
schedules](https://github.com/bevyengine/bevy/pull/8028/files#diff-b2fba3a0c86e496085ce7f0e3f1de5960cb754c7d215ed0f087aa556e529f97f),
we no longer need to track every possible value.

This also opens the door to `States` types that aren't enums.

## Solution

- Remove the unused `States::variants` method and its associated type.
- Remove the enum-only restriction on derived States types.

---

## Changelog

- Removed `States::variants` and its associated type.
- Derived `States` can now be datatypes other than enums.

## Migration Guide

- `States::variants` no longer exists. If you relied on this function,
consider using a library that provides enum iterators.
2023-09-30 22:32:39 +00:00
..
executor Cache System Tracing Spans (#9390) 2023-09-13 19:10:11 +00:00
condition.rs Remove States::variants and remove enum-only restriction its derive (#9945) 2023-09-30 22:32:39 +00:00
config.rs Fix some typos (#9934) 2023-09-26 19:46:24 +00:00
graph_utils.rs Remove reference to base sets (#9032) 2023-07-03 20:44:10 +00:00
mod.rs Replace IntoSystemSetConfig with IntoSystemSetConfigs (#9247) 2023-09-05 17:15:27 +00:00
schedule.rs Fix typos (#9965) 2023-09-29 12:26:41 +00:00
set.rs One Shot Systems (#8963) 2023-09-19 20:17:05 +00:00
state.rs Remove States::variants and remove enum-only restriction its derive (#9945) 2023-09-30 22:32:39 +00:00