Expand description
Types for declaring and storing Components.
Structs§
- Check
Change Ticks - An
Eventthat can be used to maintainTicks 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 likeTick::is_newer_thanreliably returnfalsefor ticks that got too old. - Component
Descriptor - A value describing a component or resource, which may or may not correspond to a Rust type.
- Component
Id - A value which uniquely identifies the type of a
ComponentorResourcewithin aWorld. - Component
IdFor - A
SystemParamthat provides access to theComponentIdfor a specific component type. - Component
Ids - Generates
ComponentIds. - 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
Componentin a givenWorld. - Components
Queued Registrator - A type that enables queuing registration in
Components. - Components
Registrator - A
Componentswrapper that enables additional features, like registration. - Immutable
- Parameter indicating a
Componentis immutable. - Mutable
- Parameter indicating a
Componentis mutable. - Queued
Components - Allows queuing components to be registered.
- Required
Component - Metadata associated with a required component. See
Componentfor details. - Required
Component Constructor - A Required Component constructor. See
Componentfor details. - Required
Components - The collection of metadata for components that are required for a given component.
- Required
Components Registrator - This is a safe handle around
ComponentsRegistratorandRequiredComponentsto register required components. - 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
Ticks for a single component or resource.
Enums§
- Component
Clone Behavior - The clone behavior to use when cloning or moving 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
Clonetrait. 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§
- Component
Clone Fn - 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
Componenttrait doc.