bevy/crates
Carter Anderson 1248a639ee EnumVariantMeta derive (#1972)
There are cases where we want an enum variant name. Right now the only way to do that with rust's std is to derive Debug, but this will also print out the variant's fields. This creates the unfortunate situation where we need to manually write out each variant's string name (ex: in #1963), which is both boilerplate-ey and error-prone. Crates such as `strum` exist for this reason, but it includes a lot of code and complexity that we don't need.

This adds a dead-simple `EnumVariantMeta` derive that exposes `enum_variant_index` and `enum_variant_name` functions. This allows us to make cases like #1963 much cleaner (see the second commit). We might also be able to reuse this logic for `bevy_reflect` enum derives.
2021-04-21 23:46:54 +00:00
..
bevy_app Cargo fmt with unstable features (#1903) 2021-04-21 23:19:34 +00:00
bevy_asset Document setting "CARGO_MANIFEST_DIR" for asset root (#1950) 2021-04-19 22:16:23 +00:00
bevy_audio Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_core [bevy_core/bytes] Fix UB with accessing memory with incorrect alignment (#1966) 2021-04-20 21:04:08 +00:00
bevy_derive EnumVariantMeta derive (#1972) 2021-04-21 23:46:54 +00:00
bevy_diagnostic Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dylib Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dynamic_plugin Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_ecs Cargo fmt with unstable features (#1903) 2021-04-21 23:19:34 +00:00
bevy_gilrs Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_gltf calculate flat normals for mesh if missing (#1808) 2021-04-15 21:06:49 +00:00
bevy_input Cargo fmt with unstable features (#1903) 2021-04-21 23:19:34 +00:00
bevy_internal run some examples on CI using swiftshader (#1826) 2021-04-14 21:40:36 +00:00
bevy_log Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_math Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_pbr Cargo fmt with unstable features (#1903) 2021-04-21 23:19:34 +00:00
bevy_reflect Cargo fmt with unstable features (#1903) 2021-04-21 23:19:34 +00:00
bevy_render EnumVariantMeta derive (#1972) 2021-04-21 23:46:54 +00:00
bevy_scene Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_sprite Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_tasks Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_text Cargo fmt with unstable features (#1903) 2021-04-21 23:19:34 +00:00
bevy_transform Add synonyms for transform relative vectors (#1667) 2021-04-12 21:53:05 +00:00
bevy_ui Label for ui_focus_system (#1926) 2021-04-19 19:15:27 +00:00
bevy_utils EnumVariantMeta derive (#1972) 2021-04-21 23:46:54 +00:00
bevy_wgpu Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_window Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_winit Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00