Expand description
Types for declaring and storing Component
s.
Structs§
- Component
Descriptor - A value describing a component or resource, which may or may not correspond to a Rust type.
- Component
Hooks World
-mutating functions that run as part of lifecycle events of aComponent
.- Component
Id - A value which uniquely identifies the type of a
Component
orResource
within aWorld
. - Component
IdFor - A
SystemParam
that provides access to theComponentId
for a specific component type. - Component
Ids - Generates
ComponentId
s. - Component
Info - Stores metadata for a type of component or resource stored in a specific
World
. - Component
Ticks - Records when a component or resource was added and when it was last mutably dereferenced (or added).
- Components
- Stores metadata associated with each kind of
Component
in a givenWorld
. - Components
Queued Registrator - A type that enables queuing registration in
Components
. - Components
Registrator - A
Components
wrapper that enables additional features, like registration. - Hook
Context - Context provided to a
ComponentHook
. - Immutable
- Parameter indicating a
Component
is immutable. - Mutable
- Parameter indicating a
Component
is mutable. - Queued
Components - Allows queuing components to be registered.
- Required
Component - Metadata associated with a required component. See
Component
for details. - Required
Component Constructor - A Required Component constructor. See
Component
for details. - Required
Components - The collection of metadata for components that are required for a given component.
- Tick
- A value that tracks when a system ran relative to other systems. This is used to power change detection.
- Tick
Cells - Interior-mutable access to the
Tick
s for a single component or resource.
Enums§
- Component
Clone Behavior - The clone behavior to use when cloning a
Component
. - Required
Components Error - An error returned when the registration of a required component fails.
- Storage
Type - The storage used for a specific component type.
Traits§
- Component
- A data type that can be used to store data for an entity.
- Component
Mutability - The mutability option for a
Component
. This can either be:
Functions§
- component_
clone_ ignore - Noop implementation of component clone handler function.
- component_
clone_ via_ clone - Component clone handler function implemented using the
Clone
trait. Can be set as clone handler for the specific component it is implemented for. It will panic if set as handler for any other component. - component_
clone_ via_ reflect bevy_reflect
- Component clone handler function implemented using reflect. Can be set as clone handler for any registered component, but only reflected components will be cloned.
Type Aliases§
- Component
Clone Fn - Function type that can be used to clone an entity.
- Component
Hook - The type used for
Component
lifecycle hooks such ason_add
,on_insert
oron_remove
.