Expand description
Type reflection used for dynamically interacting with rust types.
Modules
- Representation for individual element accesses within a path.
- Helpers for working with Bevy reflection.
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.
Structs
- An error originating from an
Access
of an element within a type. - A container for compile-time array info.
- An iterator over an
Array
. - A fixed-size list of reflected values.
- A dynamic representation of an enum.
- A list of reflected values.
- An ordered mapping between reflected values.
- A struct type which allows fields to be added at runtime.
- A tuple which allows fields to be added at runtime.
- A tuple struct which allows fields to be added at runtime.
- A container for compile-time enum info, used by
TypeInfo
. - An iterator over the field values of a struct.
- A container for compile-time list info.
- An iterator over an
List
. - A container for compile-time map info.
- An iterator over the key-value pairs of a
Map
. - The named field of a reflected struct.
- An
Access
combined with anoffset
for more helpful error reporting. - An error that occurs when parsing reflect path strings.
- A pre-parsed path to an element within a type.
- A struct used to deserialize reflected instances of a type.
- Type data that represents the
FromReflect
trait and allows it to be used dynamically. - A struct used to serialize reflected instances of a type.
- A container for compile-time named struct info.
- Type info for struct variants.
- An iterator over the field values of a tuple.
- A container for compile-time tuple info.
- An iterator over the field values of a tuple struct.
- A container for compile-time tuple struct info.
- Type info for tuple variants.
- Provides dynamic access to all methods on
TypePath
. - Runtime storage for type metadata, registered into the
TypeRegistry
. - A registry of reflected types.
- A synchronized wrapper around a
TypeRegistry
. - Type info for unit variants.
- The unnamed field of a reflected tuple or tuple struct.
- A container for compile-time info related to general value types, including primitives.
- An iterator over the fields in the current enum variant.
Enums
- A singular element access within a path. Multiple accesses can be combined into a
ParsedPath
. - The kind of
AccessError
, along with some kind-specific information. - A dynamic representation of an enum variant.
- A zero-sized enumuration of the “kinds” of a reflected type.
- A mutable enumeration of “kinds” of a reflected type.
- An owned enumeration of “kinds” of a reflected type.
- An error returned from a failed path string query.
- An immutable enumeration of “kinds” of a reflected type.
- Compile-time type information for various reflected types.
- A container for compile-time enum variant info.
- Describes the form of an enum variant.
Traits
- A trait used to power array-like operations via reflection.
- Dynamic dispatch for
TypePath
. - A trait used to power enum-like operations via reflection.
- A trait that enables types to be dynamically constructed from reflected data.
- Trait used to generate
TypeData
for trait reflection. - A convenience trait which combines fetching and downcasting of struct fields.
- A trait which allows nested
Reflect
values to be retrieved with path strings. - A convenience trait which combines fetching and downcasting of tuple fields.
- A convenience trait which combines fetching and downcasting of tuple struct fields.
- A trait which allows a type to generate its
TypeRegistration
for registration into theTypeRegistry
. - A trait used to power list-like operations via reflection.
- A trait used to power map-like operations via reflection.
- The core trait of
bevy_reflect
, used for accessing and modifying data dynamically. - Something that can be interpreted as a reflection path in
GetPath
. - A trait used to power struct-like operations via reflection.
- A trait used to power tuple-like operations via reflection.
- A trait used to power tuple struct-like operations via reflection.
- A trait used to type-erase type metadata.
- A static accessor to type paths and names.
- A static accessor to compile-time type information.
Functions
- The default debug formatter for
Array
types. - Returns the
u64
hash of the given array. - Compares two arrays (one concrete and one reflected) to see if they are equal.
- The default debug formatter for
Enum
types. - Returns the
u64
hash of the given enum. - Applies the elements of
b
to the corresponding elements ofa
. - The default debug formatter for
List
types. - Returns the
u64
hash of the given list. - Applies the elements of reflected map
b
to the corresponding elements of mapa
. - The default debug formatter for
Map
types. - The default debug formatter for
Struct
types. - Applies the elements of
b
to the corresponding elements ofa
. - The default debug formatter for
Tuple
types. - The default debug formatter for
TupleStruct
types. - Compares a
TupleStruct
with aReflect
value.
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 to [std::any::type_name
].