Expand description
Defines the World
and APIs for accessing it directly.
Modules§
- error
- Contains error types returned by bevy’s schedule.
- reflect
- Provides additional functionality for
World
when thebevy_reflect
feature is enabled. - unsafe_
world_ cell - Contains types that allow disjoint mutable access to a
World
.
Structs§
- Command
Queue - Densely and efficiently stores a queue of heterogenous types implementing
Command
. - Deferred
World - A
World
reference that disallows structural ECS changes. This includes initializing resources, registering components or spawning entities. - Entity
Fetcher - Provides a safe interface for non-structural access to the entities in a
World
. - Entity
Mut - Provides mutable access to a single entity and all of its components.
- Entity
MutExcept - Provides mutable access to all components of an entity, with the exception of an explicit set.
- Entity
Ref - A read-only reference to a particular
Entity
and all of its components. - Entity
RefExcept - Provides read-only access to a single entity and all its components, save for an explicitly-enumerated set.
- Entity
World Mut - A mutable reference to a particular
Entity
, and the entire world. - Filtered
Entity Mut - Provides mutable access to a single entity and some of its components defined by the contained
Access
. - Filtered
Entity Ref - Provides read-only access to a single entity and some of its components defined by the contained
Access
. - Filtered
Resources - Provides read-only access to a set of
Resource
s defined by the containedAccess
. - Filtered
Resources Builder - Builder struct to define the access for a
FilteredResources
. - Filtered
Resources Mut - Provides mutable access to a set of
Resource
s defined by the containedAccess
. - Filtered
Resources MutBuilder - Builder struct to define the access for a
FilteredResourcesMut
. - Mut
- Unique mutable borrow of an entity’s component or of a resource.
- Occupied
Component Entry - A view into an occupied entry in a
EntityWorldMut
. It is part of theOccupiedComponentEntry
enum. - Ref
- Shared borrow of an entity’s component with access to change detection.
Similar to
Mut
but is immutable and so doesn’t require unique access. - Spawn
Batch Iter - An iterator that spawns a series of entities and returns the ID of each spawned entity.
- Vacant
Component Entry - A view into a vacant entry in a
EntityWorldMut
. It is part of theComponentEntry
enum. - World
- Stores and exposes operations on entities, components, resources, and their associated metadata.
- WorldId
- A unique identifier for a
World
.
Enums§
- Component
Entry - A view into a single entity and component in a world, which may either be vacant or occupied.
- TryFrom
Filtered Error - Error type returned by
TryFrom
conversions from filtered entity types (FilteredEntityRef
/FilteredEntityMut
) to full-access entity types (EntityRef
/EntityMut
).
Constants§
- CHECK_
TICK_ THRESHOLD - The (arbitrarily chosen) minimum number of world tick increments between
check_tick
scans.
Traits§
- Dynamic
Component Fetch - Types that can be used to fetch components from an entity dynamically by
ComponentId
s. - From
World - Creates an instance of the type this trait is implemented for
using data from the supplied
World
. - World
Entity Fetch - Types that can be used to fetch
Entity
references from aWorld
.
Derive Macros§
- From
World - Implement the
FromWorld
trait.