Macro bevy_reflect::impl_reflect_value
source · impl_reflect_value!() { /* proc-macro */ }
Expand description
A macro used to generate reflection trait implementations for the given type.
This is functionally the same as deriving Reflect
using the #[reflect_value]
container attribute.
The only reason for this macro’s existence is so that bevy_reflect
can easily implement the reflection traits
on primitives and other Rust types internally.
Examples
Types can be passed with or without registering type data:
ⓘ
impl_reflect_value!(foo);
impl_reflect_value!(bar(Debug, Default, Serialize, Deserialize));
Generic types can also specify their parameters and bounds:
ⓘ
impl_reflect_value!(foo<T1, T2: Baz> where T1: Bar (Default, Serialize, Deserialize));