Crate apecs

source ·
Expand description

Welcome to the docs of the Asyncronous and Pleasant Entity Component System 😊

apecs is a flexible and well-performing entity-component-system libary that includes support for asynchronous systems.

It’s best to start learning about apecs from the World, but if you just want some examples please check out the readme

Modules

Re-export of the anyhow error handling library.
A few flavors of channels to help writing async code
Types used internally for deriving CanFetch and other macros.

Structs

The set of all entities’ components.
Creates, destroys and recycles entities.
Associates a group of components within the world.
A component value along with its entity’s id and change tracking information.
Visits world resources from async systems.
Add components lazily, at the time of your choosing.
Query type used to denote an optional column.
Valueless type that represents the inability to generate a resource by default.
A builder of resource requirements and systems.
Queries are used to iterate over matching bundles of components.
A prepared and active query.
Immutably borrowed resource that may be created by default.
Valueless type that represents the ability to generate a resource by default.
A spawned task.
Query type used to denote the absence of the wrapped type.
A collection of resources and systems.
A mutably borrowed resource that may be created by default.

Enums

Defines the number of threads to use for inner and outer parallelism.
Whether or not a system should continue execution.

Traits

Types that can be fetched from the World.
Used to generate a default value of a resource, if possible.
Provides runtime type info about bundles and more.
Denotes the shape of a query that can be used to iterate over bundles of components.
Marker trait that denotes a static, nameable type that can be sent between threads.

Functions

Get the current system iteration timestamp.
Returns a syncronous system result meaning everything is ok, but the system should not be run again.
Returns a syncronous system result meaning an error occured and the system should not run again.
Returns a syncronous system result meaning everything is ok and the system should run again next frame.

Type Definitions

Type alias for a hashmap using the fx hash algorithm.
Alias for Maybe<&'static mut T> for folks with wrist pain.
Alias for Maybe<&'static T> for folks with wrist pain.
Alias for &'static mut T for folks with wrist pain.
Iterator returned by QueryGuard::iter_mut.
Alias for &'static T for folks with wrist pain.

Derive Macros