Crate apecs

Source
Expand description

Welcome to the Asyncronous and Pleasant Entity Component System 😊

apecs is a flexible and well-performing entity-component-system that plays nice with async runtimes.

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

Macros§

graph
Constructs a Graph using an intuitive shorthand for node ordering relationships.

Structs§

Components
The set of all entities’ components.
Entities
Creates, destroys and recycles entities.
Entity
Components associated by a common identifier.
Entry
A component value along with its entity’s id and change tracking information.
Facade
A Facade visits world resources from async futures.
FacadeSchedule
A fulfillment schedule of requests for world resources, coming from all the World’s Facades.
Graph
An acyclic, directed graph made up of nodes/functions and edges/resources.
LazyComponents
Add components lazily, at the time of your choosing.
Maybe
Query type used to denote an optional column.
Move
Specifies a graph edge/resource that is “moved” by a node.
NoDefault
Valueless type that represents the inability to generate a resource by default.
Query
Queries are used to iterate over matching bundles of components.
QueryGuard
A prepared and active query.
TypeKey
A key for a type-erased value.
TypeMap
A map of type identifiers to type-erased values.
View
Immutably borrowed resource that may be created by default.
ViewMut
A mutably borrowed resource that may be created by default.
Without
Query type used to denote the absence of the wrapped type.
World
A collection of resources and systems.

Enums§

GraphError
All errors.
Parallelism
Defines the number of threads to use for inner and outer parallelism.

Traits§

Edges
Trait for describing types that are made up of graph edges (ie resources).
IsBundle
Provides runtime type info about bundles and more.
IsQuery
Denotes the shape of a query that can be used to iterate over bundles of components.
NodeResults
Trait for describing types that are the result of running a node.

Functions§

current_iteration
Get the current system iteration timestamp.
end
Returns a result meaning everything is ok, but the node should be removed from the graph.
err
Returns a result meaning an error occured and the graph cannot recover.
ok
Returns a result meaning everything is ok and the node should run again next frame.

Type Aliases§

MaybeMut
Alias for Maybe<&'static mut T> for folks with wrist pain.
MaybeRef
Alias for Maybe<&'static T> for folks with wrist pain.
Mut
Alias for &'static mut T for folks with wrist pain.
QueryIter
Iterator returned by QueryGuard::iter_mut.
Ref
Alias for &'static T for folks with wrist pain.

Derive Macros§

Edges