bevy/crates/bevy_reflect/src
Erick Z 20781371e8
Register ReflectSerialize for &'static str (#19680)
# Objective

- When trying to serialize an structure that contains `&'static str`
using only Reflection, I get the following error:
```
"type `&str` did not register the `ReflectSerialize` or `ReflectSerializeWithRegistry` type data. 
For certain types, this may need to be registered manually using `register_type_data` (stack: ... -> `core::option::Option<&str>` -> `&str`)")
```
## Solution

- Register `ReflectSerialize` for `&str`

## Testing

- `cargo run -p ci`: OK
2025-06-16 22:09:15 +00:00
..
enums deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
func deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
impls Register ReflectSerialize for &'static str (#19680) 2025-06-16 22:09:15 +00:00
path Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
serde deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
array.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
attributes.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
error.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
fields.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
from_reflect.rs bevy_reflect: Apply #[deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (#17092) 2025-01-03 22:22:34 +00:00
generics.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
kind.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
lib.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
list.rs More uninlined_format_args fixes (#19396) 2025-05-28 02:35:18 +00:00
map.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
reflect.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
reflectable.rs bevy_reflect: Add Reflectable trait (#5772) 2024-09-18 00:36:41 +00:00
remote.rs Add no_std support to bevy_reflect (#16256) 2024-12-05 21:15:21 +00:00
set.rs More uninlined_format_args fixes (#19396) 2025-05-28 02:35:18 +00:00
std_traits.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
struct_trait.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
tuple_struct.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
tuple.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
type_info_stack.rs Remove Implicit std Prelude from no_std Crates (#17086) 2025-01-03 01:58:43 +00:00
type_info.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
type_path.rs Add no_std support to bevy_reflect (#16256) 2024-12-05 21:15:21 +00:00
type_registry.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
utility.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00