Expand description
Shipyard is an Entity Component System focused on usability and speed.
The user guide is a great place to learn all about Shipyard!
§Features
- parallel (default) — enables workload threading and add parallel iterators
- proc (default) — re-exports macros from
shipyard_proc
, mainly to deriveComponent
- serde1 — adds (de)serialization support with serde
- std (default) — lets Shipyard use the standard library
- thread_local — adds methods and types required to work with
!Send
and!Sync
components - tracing — reports workload and system execution
Re-exports§
pub use crate::borrow::NonSend;
thread_local
pub use crate::borrow::NonSendSync;
thread_local
pub use crate::borrow::NonSync;
thread_local
pub use iter::IntoIter;
pub use iter::IntoWithId;
Modules§
- Allows access to helper types needed to implement
Borrow
. - All error types.
- Types for displaying workload information.
- Iterators types and traits.
- module related to storage tracking, like insertion or modification.
Structs§
- Wraps an
AtomicRefcell
’s shared borrow. - Wraps an
AtomicRefcell
’s exclusive borrow. - Contains all storages present in the
World
. - Shared view over
AllStorages
. - Exclusive view over
AllStorages
. - Iterator over newly bulk added entities.
- Entities holds the EntityIds to all entities: living, removed and dead.
- Shared view over
Entities
storage. - Exclusive view over
Entities
storage. - Handle to an entity.
- Wrapper type allowing iterating over inserted flagged components.
- Wrapper type allowing iterating over inserted and modified flagged components.
- Wrapper type allowing iterating over modified flagged components.
- Tracks component modification.
- Used to filter out components.
- Yield the entities that have a component or another.
- Shared reference to a component.
- Exclusive reference to a component.
- Used to create a
Workload
. - Internal part of a
SparseSet
. - Default component storage.
- A draining iterator for
SparseSet<T>
. - A trait to query the amount of memory a storage uses.
- Timestamp used to clear tracking information.
- Unique storage.
- Shared view over a unique component storage.
- Exclusive view over a unique component storage.
- Shared view over a component storage.
- Exclusive view over a component storage.
- Keeps information to create a workload.
- Self contained system that may be inserted into a
Workload
. World
contains all data this library will manipulate.- Builder for
World
when one wants custom lock, custom thread pool or custom thread id provider function.
Enums§
- Describes if a storage is borrowed exclusively or not.
It is used to display workloads’ borrowing information. - Returned when iterating with
Or
filter. - Id of a storage, can be a
TypeId
oru64
.
Traits§
- Defines how components are added to an existing entity.
- Add component only if not already present.
- Trait describing how to add a new entity to a storage.
- Converts a value to a
Box<dyn Label>
- Allows a type to be borrowed by
AllStorages::borrow
,AllStorages::run
,World::borrow
,World::run
and workloads. - Explains to a workload which storage are borrowed by a system.
- Trait used as bound for
World::bulk_add_entity
andAllStorages::bulk_add_entity
. - Reserves memory for a set of entities.
- Indicates that a
struct
orenum
can be store in theWorld
. - Checks if an entity has some components.
- Low level access to storage.
- Deletes component from entities.
- Bound for tracking deletion.
- Retrieves components based on their type and entity id.
- Trait used as bound for
World::get
andAllStorages::get
. - Trait used as bound for
World::get_unique
andAllStorages::get_unique
. - Bound for tracking insertion.
- Converts to a collection of systems.
- Trait used to add systems to a workload.
- Trait used to add fallible systems to a workload.
- Trait used as bound for
World::iter
andAllStorages::iter
. - Workload identifier
- Bound for tracking modification.
- Bound for tracking removal or deletion.
- Bound for tracking removal.
- Removes component from entities.
- Defines common storage operations.
- Modifies a system.
- Trait implemented by all trackings.
- Trait used as bound for
World::add_entity
,World::add_component
,AllStorages::add_entity
andAllStorages::add_component
. - Trait used as bound for
World::delete_component
andAllStorages::delete_component
. - Trait used as a bound for
World::delete_any
and AllStorages::delete_any. - Trait used as bound for
World::remove
andAllStorages::remove
. - Trait used as bound for
World::retain_storage
andAllStorages::retain_storage
. - Trait used as bound for
World::track_*
andAllStorages::track_*
. - Indicates that a
struct
orenum
can be store a single time in theWorld
. - Modifies a workload.
- Allows a type to be borrowed by
World::borrow
andWorld::run
.
Derive Macros§
- Requires
Hash
,Debug
,PartialEq
,Clone