Skip to main content

Module bundle

Module bundle 

Source
Expand description

Types for handling Bundles.

This module contains the Bundle trait and some other helper types.

Structs§

BundleId
For a specific World, this stores a unique value identifying a type of a registered Bundle.
BundleInfo
Stores metadata associated with a specific type of Bundle for a given World.
BundleScratch
Enables pushing components to internal scratch space (uses a bump allocator), which can then be written as a dynamic bundle. The contents are cleared after each write and the allocated scratch space is reused across writes.
BundleWriter
Enables pushing components to the internal BundleScratch, which can then be written as a dynamic bundle.
Bundles
Metadata for bundles. Stores a BundleInfo for each type of Bundle in a given world.

Enums§

InsertMode
What to do on insertion if a component already exists.

Traits§

Bundle
The Bundle trait enables insertion and removal of Components from an entity.
BundleFromComponents
Creates a Bundle by taking it from internal storage.
DynamicBundle
The parts from Bundle that don’t require statically knowing the components of the bundle.
NoBundleEffect
A trait implemented for DynamicBundle::Effect implementations that do nothing. This is used as a type constraint for Bundle APIs that do not / cannot run DynamicBundle::Effect, such as “batch spawn” APIs.

Derive Macros§

Bundle
Derive the Bundle trait