Module despero::ecs

source ·
Expand description

ECS components and re-exports

Re-exports

Modules

  • This module provides traits for borrowing values and the relationship between references and owned values, as well as ref cells.
  • This module provides types and traits associated to accessing of borrowed values.
  • This module provides the error type and result type aliases for hecs-schedule.
  • Provides system which are an abstraction for anything that can be executed against a Context.
  • Defines common traits

Macros

Structs

  • Describes how a type is accessed.
  • Query that retrieves added state of type T component.
  • Marker type for a subworld which has access to the whole world
  • A collection of entities having the same component types
  • Represents a unit of work with compatible borrows.
  • Holds information regarding batches
  • The output of an EntityBuilder, suitable for passing to World::spawn or World::insert
  • Query that retrieves changed state of type T component. Changed component is one that have either been mutated or added.
  • An incomplete collection of component data for entities with the same component types
  • A collection of component types
  • Extends the built in hecs::CommandBuffer.
  • Holds all data necessary for the execution of the world. The data is held by references, and needs to outlive the context itself
  • Lightweight unique ID, or handle, of an entity
  • Helper for incrementally constructing a bundle of components with dynamic component types
  • A wrapper for providing a system with a name
  • Wraps the bulting QueryOne with a Result containing the entity and component instead of option
  • Wrapper type for an immutably borrowed value from schedule context
  • A shedule represents a collections of system which will run with effects in a determined order.
  • Builder for incrementally constructing a schedule.
  • Represents a borrow of the world which can only access a subset of components (unless AllAccess is used).
  • Query transformer skipping entities that do not satisfy another query
  • Query transformer skipping entities that satisfy another query
  • An unordered collection of entities, each having any number of distinctly typed components
  • Wrapper type for an exclusively borrowed value

Enums

  • Exported error types. Some of these errors map the hecs errors but provide better context such as the entity.

Traits

  • A statically typed collection of components
  • Types that can be components, implemented automatically for all Send + Sync + 'static types
  • Trait for a set of component accesses
  • Dynamically accessed static collection of values
  • Implements deserialization of archetypes
  • Helper trait for types which do not implement clone, but has a clone wrapper
  • Trait for allowing function to work on both World and SubWorld
  • Convert a type into the correspodning access.
  • Convert a tuple or other type into Data.
  • A collection of component types to fetch from a World
  • Implements serialization of archetypes
  • Declare subset relations between tuples
  • Trait which defines any function or type that can operate on a world or other context.

Functions

Type Definitions

  • An empty subworld, can not access any components
  • Type alias for a subworld referencing the world by an [atomic_refcell::AtomicRef]. Most common for schedules
  • Type alias for a subworld referencing the world by a reference
  • Type alias for a subworld referencing the world by a std::cell::Ref
  • System name alias

Derive Macros

  • Implement Bundle for a struct
  • Implement Query for a struct