bevy/crates/bevy_reflect/src
Clar Fon 2c5be2ef4c
Reflect for TextureFormat (#15355)
# Objective

In order to derive `Reflect`, all of a struct's fields must implement
`FromReflect`. [As part of looking into some of the work mentioned
here](https://github.com/bevyengine/bevy/issues/13713#issuecomment-2364786694),
I noticed that `TextureFormat` doesn't implement `Reflect`, and decided
to split that into a separate PR.

## Solution

I decided that `TextureFormat` should be a `reflect_value` since,
although one variant has fields, most users will treat this as an opaque
value set explicitly. It also substantially reduces the complexity of
the implementation.

For now, this implementation isn't actually used by any crates, so, I
decided to not preemptively enable the feature on anything. But it's
technically an option, now, and more `wgpu` types can be added in the
future.

## Testing

Everything compiles okay, and I can't really see how this could be done
incorrectly given the above constraints.
2024-09-23 17:26:12 +00:00
..
enums bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
func bevy_reflect: Automatic arg count validation (#15145) 2024-09-23 17:03:14 +00:00
impls Reflect for TextureFormat (#15355) 2024-09-23 17:26:12 +00:00
path Fix warnings triggered by elided_named_lifetimes lint (#15328) 2024-09-20 19:17:33 +00:00
serde bevy_reflect: Add Function trait (#15205) 2024-09-22 14:19:12 +00:00
array.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
attributes.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
fields.rs bevy_reflect: Add Type type (#14838) 2024-08-25 17:57:07 +00:00
from_reflect.rs bevy_reflect: Update on_unimplemented attributes (#15110) 2024-09-09 16:26:17 +00:00
kind.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
lib.rs Reflect for TextureFormat (#15355) 2024-09-23 17:26:12 +00:00
list.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
map.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
reflect.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
reflectable.rs bevy_reflect: Add Reflectable trait (#5772) 2024-09-18 00:36:41 +00:00
remote.rs bevy_reflect: Reflect remote types (#6042) 2024-08-12 19:12:53 +00:00
set.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
short_name.rs move ShortName to bevy_reflect (#15340) 2024-09-21 20:52:46 +00:00
std_traits.rs
struct_trait.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
tuple_struct.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
tuple.rs bevy_reflect: Add ReflectRef/ReflectMut/ReflectOwned convenience casting methods (#15235) 2024-09-23 16:50:46 +00:00
type_info_stack.rs bevy_reflect: Contextual serialization error messages (#13888) 2024-09-09 17:52:40 +00:00
type_info.rs Allow animation clips to animate arbitrary properties. (#15282) 2024-09-23 17:14:12 +00:00
type_path.rs bevy_reflect: Update on_unimplemented attributes (#15110) 2024-09-09 16:26:17 +00:00
type_registry.rs bevy_reflect: Add dynamic type data access and iteration to TypeRegistration (#15347) 2024-09-23 17:21:22 +00:00
utility.rs bevy_reflect: Add DynamicTyped trait (#15108) 2024-09-13 17:17:10 +00:00