Module world

Module world 

Source
Expand description

Defines the World and APIs for accessing it directly.

Re-exports§

pub use crate::change_detection::Mut;
pub use crate::change_detection::Ref;
pub use crate::change_detection::CHECK_TICK_THRESHOLD;

Modules§

error
Contains error types returned by bevy’s schedule.
reflect
Provides additional functionality for World when the bevy_reflect feature is enabled.
unsafe_world_cell
Contains types that allow disjoint mutable access to a World.

Structs§

CommandQueue
Densely and efficiently stores a queue of heterogenous types implementing Command.
DeferredWorld
A World reference that disallows structural ECS changes. This includes initializing resources, registering components or spawning entities.
EntityFetcher
Provides a safe interface for non-structural access to the entities in a World.
EntityMut
Provides mutable access to a single entity and all of its components.
EntityMutExcept
Provides mutable access to all components of an entity, with the exception of an explicit set.
EntityRef
A read-only reference to a particular Entity and all of its components.
EntityRefExcept
Provides read-only access to a single entity and all its components, save for an explicitly-enumerated set.
EntityWorldMut
A mutable reference to a particular Entity, and the entire world.
FilteredEntityMut
Provides mutable access to a single entity and some of its components defined by the contained Access.
FilteredEntityRef
Provides read-only access to a single entity and some of its components defined by the contained Access.
FilteredResources
Provides read-only access to a set of Resources defined by the contained Access.
FilteredResourcesBuilder
Builder struct to define the access for a FilteredResources.
FilteredResourcesMut
Provides mutable access to a set of Resources defined by the contained Access.
FilteredResourcesMutBuilder
Builder struct to define the access for a FilteredResourcesMut.
OccupiedComponentEntry
A view into an occupied entry in a EntityWorldMut. It is part of the OccupiedComponentEntry enum.
SpawnBatchIter
An iterator that spawns a series of entities and returns the ID of each spawned entity.
VacantComponentEntry
A view into a vacant entry in a EntityWorldMut. It is part of the ComponentEntry enum.
World
Stores and exposes operations on entities, components, resources, and their associated metadata.
WorldId
A unique identifier for a World.

Enums§

ComponentEntry
A view into a single entity and component in a world, which may either be vacant or occupied.
TryFromFilteredError
Error type returned by TryFrom conversions from filtered entity types (FilteredEntityRef/FilteredEntityMut) to full-access entity types (EntityRef/EntityMut).

Traits§

DynamicComponentFetch
Types that can be used to fetch components from an entity dynamically by ComponentIds.
FromWorld
Creates an instance of the type this trait is implemented for using data from the supplied World.
WorldEntityFetch
Types that can be used to fetch Entity references from a World.

Derive Macros§

FromWorld
Implement the FromWorld trait.