Expand description
This crate contains macros used by Bevy’s Reflect
API.
The main export of this crate is the derive macro for Reflect
. This allows
types to easily implement Reflect
along with other bevy_reflect
traits,
such as Struct
, GetTypeRegistration
, and more— all with a single derive!
Some other noteworthy exports include the derive macros for FromReflect
and
TypePath
, as well as the reflect_trait
attribute macro.
Macros§
- A macro used to generate a
FromReflect
trait implementation for the given type. - A replacement for
#[derive(Reflect)]
to be used with foreign types which the definitions of cannot be altered. - A macro used to generate reflection trait implementations for the given type.
- A replacement for deriving
TypePath
for use on foreign types.
Attribute Macros§
- A macro that automatically generates type data for traits, which their implementors can then register.
Derive Macros§
- Derives the
FromReflect
trait. - The main derive macro used by
bevy_reflect
for deriving itsReflect
trait. - Derives the
TypePath
trait, providing a stable alternative tostd::any::type_name
.