Module component

Module component 

Source
Expand description

Types for declaring and storing Components.

Structs§

CheckChangeTicks
An Event that can be used to maintain Ticks in custom data structures, enabling to make use of bevy’s periodic checks that clamps ticks to a certain range, preventing overflows and thus keeping methods like Tick::is_newer_than reliably return false for ticks that got too old.
ComponentDescriptor
A value describing a component or resource, which may or may not correspond to a Rust type.
ComponentId
A value which uniquely identifies the type of a Component or Resource within a World.
ComponentIdFor
A SystemParam that provides access to the ComponentId for a specific component type.
ComponentIds
Generates ComponentIds.
ComponentInfo
Stores metadata for a type of component or resource stored in a specific World.
ComponentTicks
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 given World.
ComponentsQueuedRegistrator
A type that enables queuing registration in Components.
ComponentsRegistrator
A Components wrapper that enables additional features, like registration.
Immutable
Parameter indicating a Component is immutable.
Mutable
Parameter indicating a Component is mutable.
QueuedComponents
Allows queuing components to be registered.
RequiredComponent
Metadata associated with a required component. See Component for details.
RequiredComponentConstructor
A Required Component constructor. See Component for details.
RequiredComponents
The collection of metadata for components that are required for a given component.
RequiredComponentsRegistrator
This is a safe handle around ComponentsRegistrator and RequiredComponents to register required components.
Tick
A value that tracks when a system ran relative to other systems. This is used to power change detection.
TickCells
Interior-mutable access to the Ticks for a single component or resource.

Enums§

ComponentCloneBehavior
The clone behavior to use when cloning or moving a Component.
RequiredComponentsError
An error returned when the registration of a required component fails.
StorageType
The storage used for a specific component type.

Traits§

Component
A data type that can be used to store data for an entity.
ComponentMutability
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
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§

ComponentCloneFn
Function type that can be used to clone a component of an entity.

Derive Macros§

Component
Cheat sheet for derive syntax, see full explanation and examples on the Component trait doc.