Expand description
Runtime reflection helpers built on top of bevy_reflect.
Modules§
- access
- Representation for individual element accesses within a path.
- array
- Traits and types used to power array-like operations via reflection.
- attributes
- Types and functions for creating, manipulating and querying
CustomAttributes. - convert
- The
ReflectConverttype, which allows types to register conversions to and from one another. - enums
- Traits and types used to power enum-like operations via reflection.
- erased_
serde - github crates-io docs-rs
- list
- Traits and types used to power list-like operations via reflection.
- map
- Traits and types used to power map-like operations via reflection.
- prelude
- The reflect prelude.
- serde
- Serde integration for reflected types.
- set
- A trait used to power set-like operations via reflection.
- std_
traits - Module containing the
ReflectDefaulttype. - structs
- Traits and types used to power struct-like operations via reflection.
- tuple
- Traits and types used to power tuple-like operations via reflection.
- tuple_
struct - Traits and types used to power tuple-struct-like operations via reflection.
- utility
- Helpers for working with Bevy reflection.
Macros§
- hash_
error - Used to produce an error message when an attempt is made to hash
a
PartialReflectvalue that does not support hashing. - 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.
Structs§
- Access
Error - An error originating from an
Accessof an element within a type. - Array
Info - A container for compile-time array info.
- Const
Param Info - Type information for a const generic parameter.
- Enum
Info - A container for compile-time enum info, used by
TypeInfo. - Generics
- The generic parameters of a type.
- List
Info - A container for compile-time list info.
- MapInfo
- A container for compile-time map info.
- Named
Field - The named field of a reflected struct.
- Offset
Access - An
Accesscombined with anoffsetfor more helpful error reporting. - Opaque
Info - A container for compile-time info related to reflection-opaque types, including primitives.
- Parse
Error - An error that occurs when parsing reflect path strings.
- Parsed
Path - A pre-parsed path to an element within a type.
- Reflect
Deserialize - A struct used to deserialize reflected instances of a type.
- Reflect
From Ptr Reflectvalues are commonly used in situations where the actual types of values are not known at runtime. In such situations you might have access to a*const ()pointer that you know implementsReflect, but have no way of turning it into a&dyn Reflect.- Reflect
From Reflect - Type data that represents the
FromReflecttrait and allows it to be used dynamically. - Reflect
Kind Mismatch Error - Caused when a type was expected to be of a certain kind, but was not.
- Reflect
Serialize - A struct used to serialize reflected instances of a type.
- SetInfo
- A container for compile-time set info.
- Struct
Info - A container for compile-time named struct info.
- Tuple
Info - A container for compile-time tuple info.
- Tuple
Struct Info - A container for compile-time tuple struct info.
- Type
- The base representation of a Rust type.
- Type
Param Info - Type information for a generic type parameter.
- Type
Path Table - Provides dynamic access to all methods on
TypePath. - Type
Registration - Runtime storage for type metadata, registered into the
TypeRegistry. - Type
Registry - A registry of reflected types.
- Type
Registry Arc - A synchronized wrapper around a
TypeRegistry. - Unnamed
Field - The unnamed field of a reflected tuple or tuple struct.
Enums§
- Access
- A singular element access within a path.
Multiple accesses can be combined into a
ParsedPath. - Access
Error Kind - The kind of
AccessError, along with some kind-specific information. - Apply
Error - A enumeration of all error outcomes that might happen when running
try_apply. - FieldId
- A representation of a field’s accessor.
- Generic
Info - An enum representing a generic parameter.
- Reflect
Clone Error - An error that occurs when cloning a type via
PartialReflect::reflect_clone. - Reflect
Kind - An enumeration of the “kinds” of a reflected type.
- Reflect
Mut - A mutable enumeration of “kinds” of a reflected type.
- Reflect
Owned - An owned enumeration of “kinds” of a reflected type.
- Reflect
Path Error - An error returned from a failed path string query.
- Reflect
Ref - An immutable enumeration of “kinds” of a reflected type.
- Type
Info - Compile-time type information for various reflected types.
- Type
Info Error - A
TypeInfo-specific error. - Variant
Info - A container for compile-time enum variant info.
- Variant
Type - Describes the form of an enum variant.
Traits§
- Array
- A trait used to power array-like operations via reflection.
- Dynamic
Type Path - Dynamic dispatch for
TypePath. - Dynamic
Typed - Dynamic dispatch for
Typed. - Enum
- A trait used to power enum-like operations via reflection.
- From
Reflect - A trait that enables types to be dynamically constructed from reflected data.
- From
Type - Trait used to generate
TypeDatafor trait reflection. - GetPath
- A trait which allows nested
Reflectvalues to be retrieved with path strings. - GetType
Registration - A trait which allows a type to generate its
TypeRegistrationfor registration into theTypeRegistry. - Is
- Checks if the current type “is” another type, using a
TypeIdequality comparison. - List
- A trait used to power list-like operations via reflection.
- Map
- A trait used to power map-like operations via reflection.
- Partial
Reflect - The foundational trait of
bevy_reflect, used for accessing and modifying data dynamically. - Reflect
- A core trait of
bevy_reflect, used for downcasting to concrete types. - Reflect
Path - Something that can be interpreted as a reflection path in
GetPath. - Reflect
Remote - Marks a type as a reflectable wrapper for a remote type.
- Reflect
Task Introspection - Runtime task-reflect contract exposed by generated Copper applications.
- Reflect
Type Path - Reflectable
- A catch-all trait that is bound by the core reflection traits, useful to simplify reflection-based generic type bounds.
- Set
- A trait used to power set-like operations via reflection.
- Struct
- A trait used to power struct-like operations via reflection.
- Tuple
- A trait used to power tuple-like operations via reflection.
- Tuple
Struct - A trait used to power tuple struct-like operations via reflection.
- Type
Data - A trait used to type-erase type metadata.
- Type
Path - A static accessor to type paths and names.
- Typed
- A static accessor to compile-time type information.
Functions§
- dump_
type_ registry_ schema - Dumps a stable, human-readable schema snapshot for the registered reflected types.
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 to [std::any::type_name].