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§
- impl_
from_ reflect_ opaque - A macro used to generate a
FromReflecttrait implementation for the given type. - impl_
reflect - A replacement for
#[derive(Reflect)]to be used with foreign types which the definitions of cannot be altered. - impl_
reflect_ opaque - A macro used to generate reflection trait implementations for the given type.
- impl_
type_ path - A replacement for deriving
TypePathfor use on foreign types. - load_
type_ registrations - Collects and loads type registrations when using
auto_register_staticfeature.
Attribute Macros§
- reflect_
remote - Generates a wrapper type that can be used to “derive
Reflect” for remote types. - reflect_
trait - A macro that automatically generates type data for traits, which their implementors can then register.
Derive Macros§
- From
Reflect - Derives the
FromReflecttrait. - Reflect
- The main derive macro used by
bevy_reflectfor deriving itsReflecttrait. - Type
Path - Derives the
TypePathtrait, providing a stable alternative tostd::any::type_name.