Crate flatbox_ecs
Source - borrow
- This module provides traits for borrowing values and the relationship
between references and owned values, as well as ref cells.
- bundle
- Implementations of ecs bundle
- context
- This module provides types and traits associated to accessing of borrowed
values.
- error
- This module provides the error type and result type aliases for
hecs-schedule.
- event
- lazy_static
- A macro for declaring lazily evaluated statics.
- query
- ECS-queries
- serialize
- Convenience tools for serializing
Worlds - system
- Provides system which are an abstraction for anything that can be executed
against a Context.
- traits
- Defines common traits
- count
- Return size of tuple
- expand
- Expands a tuple
- impl_for_tuples
- Execute macro for each kind of tuple
- impl_for_tuples_idx
- Execute macro for each kind of tuple
- impl_into_borrow
- Macro for implementing lifetime eliding IntoBorrow
- smallvec
- Creates a
SmallVec containing the arguments.
- Access
- Describes how a type is accessed.
- Added
- Query that retrieves added state of type
T component. - AllAccess
- Marker type for a subworld which has access to the whole world
- Archetype
- A collection of entities having the same component types
- ArchetypeColumn
- Shared reference to a single column of component data in an
Archetype - ArchetypeColumnMut
- Unique reference to a single column of component data in an
Archetype - ArchetypesGeneration
- Determines freshness of information derived from
World::archetypes - Batch
- Represents a unit of work with compatible borrows.
- BatchIncomplete
- Error indicating that a
ColumnBatchBuilder was missing components - BatchInfo
- Holds information regarding batches
- BatchWriter
- Handle for appending components
- BatchedIter
- Batched version of
QueryIter - BuiltEntity
- The output of an
EntityBuilder, suitable for passing to
World::spawn or World::insert - BuiltEntityClone
- A collection of components that implement
Clone - Changed
- Query that retrieves changed state of type
T component.
Changed component is one that have either been mutated or added. - ColumnBatch
- A collection of component data for entities with the same component types
- ColumnBatchBuilder
- An incomplete collection of component data for entities with the same component types
- ColumnBatchType
- A collection of component types
- CommandBuffer
- Extends the built in hecs::CommandBuffer.
- Context
- Holds all data necessary for the execution of the world.
The data is held by references, and needs to outlive the context itself
- DynamicClone
- Type-erased
Clone implementation - Entity
- Lightweight unique ID, or handle, of an entity
- EntityBuilder
- Helper for incrementally constructing a bundle of components with dynamic component types
- EntityBuilderClone
- Variant of
EntityBuilder that clones components on use - EntityRef
- Handle to an entity with any component types
- Iter
- Iterator over all of a world’s entities
- MaybeRead
- Wrapper type for an immutably borrowed value from schedule context which may
not exist.
- MaybeWrite
- Wrapper type for an exclusively value from schedule context which may not exist.
- MissingComponent
- Error indicating that an entity did not have a required component
- Mutated
- Query that retrieves mutation state of type
T component.
Added components do not count as mutated. - NamedSystem
- A wrapper for providing a system with a name
- NoSuchEntity
- Error indicating that no entity with a particular ID exists
- PreparedQuery
- A prepared query can be stored independently of the
World to amortize query set-up costs. - PreparedQueryBorrow
- Combined borrow of a
PreparedQuery and a World - PreparedQueryIter
- Iterates over all entities matching a
PreparedQuery - PreparedView
- Provides random access to the results of a prepared query
- QueryBorrow
- A borrow of a
World sufficient to execute the query Q - QueryIter
- Iterator over the set of entities with the components in
Q - QueryMut
- A query builder that’s convertible directly into an iterator
- QueryOne
- Wraps the bulting QueryOne with a Result containing the entity and component instead of option
- Read
- Wrapper type for an immutably borrowed value from schedule context
- Ref
- Shared borrow of an entity’s component
- RefMut
- Unique borrow of an entity’s component
- Satisfies
- A query that yields
true iff an entity would satisfy the query Q - Schedule
- A shedule represents a collections of system which will run with effects in
a determined order.
- ScheduleBuilder
- Builder for incrementally constructing a schedule.
- SpawnBatchIter
- Entity IDs created by
World::spawn_batch - SpawnColumnBatchIter
- Iterator over
Entitys spawned by World::spawn_column_batch() - SubWorldRaw
- Represents a borrow of the world which can only access a subset of
components (unless
AllAccess is used). - TakenEntity
- An entity removed from a
World - TypeInfo
- Metadata required to store a component.
- View
- Provides random access to the results of a query
- With
- Query transformer skipping entities that do not satisfy another query
- Without
- Query transformer skipping entities that satisfy another query
- World
- An unordered collection of entities, each having any number of distinctly typed components
- Write
- Wrapper type for an exclusively borrowed value
- ComponentError
- Errors that arise when accessing components
- Error
- Exported error types.
Some of these errors map the hecs errors but provide better context such as
the entity.
- Or
- Holds an
L, or an R, or both - QueryOneError
- Errors that arise when querying a single entity
- Bundle
- A statically typed collection of components
- Component
- Types that can be components, implemented automatically for all
Send + Sync + 'static types - ComponentBorrow
- Trait for a set of component accesses
- ComponentRef
&T or &mut T where T is some component type- ComponentRefShared
&T where T is some component type- ContextBorrow
- Helper trait for borrowing either immutably or mutably from context
- Data
- Dynamically accessed static collection of values
- DeserializeContext
- Implements deserialization of archetypes
- DynamicBundle
- A dynamically typed collection of components
- DynamicBundleClone
- A dynamically typed collection of cloneable components
- ExternalClone
- Helper trait for types which do not implement clone, but has a clone wrapper
- Fetch
- Streaming iterators over contiguous homogeneous ranges of components
- GenericWorld
- Trait for allowing function to work on both World and SubWorld
- IntoAccess
- Convert a type into the correspodning access.
- IntoBorrow
- Lifetime erasure in waiting of GAT
- IntoData
- Convert a tuple or other type into Data.
- Query
- A collection of component types to fetch from a
World - QueryShared
- Marker trait indicating whether a given
Query will not produce unique references - SerializeContext
- Implements serialization of archetypes
- Subset
- Declare subset relations between tuples
- System
- Trait which defines any function or type that can operate on a world or
other context.
- deserialize
- Deserialize a
World with a DeserializeContext and a Deserializer - deserialize_column
- Deserialize a column of
entity_count Ts from seq into out - deserialize_world
- Deserialize a
World with a DeserializeContext and a Deserializer - serialize
- Serialize a
World through a SerializeContext to a Serializer - serialize_world
- Serialize a
World through a SerializeContext to a Serializer - try_serialize
- If
archetype has T components, serialize them into out - try_serialize_id
- If
archetype has T components, serialize id into S
- Borrows
- Type alias for list of borrows
- EmptyWorld
- An empty subworld, can not access any components
- Schedules
- SubWorld
- Type alias for a subworld referencing the world by an atomic_refcell::AtomicRef. Most
common for schedules
- SubWorldRef
- Type alias for a subworld referencing the world by a reference
- SubWorldRefCell
- Type alias for a subworld referencing the world by a std::cell::Ref
- SystemName
- System name alias
- Bundle
- Implement
Bundle for a struct - DynamicBundleClone
- Implement
DynamicBundleClone for a struct. - Query
- Implement
Query for a struct