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
- extended_tuple — extends implementations from the default 10 to 32 tuple size at the cost of 4X build time
- 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
Modules§
- all_
storages - atomic_
refcell - Inner lock similar to
RwLock
. - borrow
- Allows access to helper types needed to implement
Borrow
. - error
- All error types.
- get_
component - Trait bound for
AllStorages::get
andWorld::get
. - get_
unique - Trait bound for
AllStorages::get_unique
andWorld::get_unique
. - iter
- iter_
component - memory_
usage - Module describing internal memory usage.
- reserve
- scheduler
- sparse_
set - Default component storage.
- system
- track
- Module related to storage tracking, like insertion or modification.
- tracking
- world
Structs§
- AllStorages
- Contains all storages present in the
World
. - AllStorages
View - Shared view over
AllStorages
. - AllStorages
View Mut - Exclusive view over
AllStorages
. - Entities
- Entities holds the EntityIds to all entities: living, removed and dead.
- Entities
View - Shared view over
Entities
storage. - Entities
View Mut - Exclusive view over
Entities
storage. - Entity
Id - Handle to an entity.
- Inserted
- Wrapper type allowing iterating over inserted flagged components.
- Inserted
OrModified - Wrapper type allowing iterating over inserted and modified flagged components.
- Modified
- Wrapper type allowing iterating over modified flagged components.
- Mut
- Tracks component modification.
- Not
- Used to filter out components.
- Optional
- Allows iteration over a component that may be absent.
- Or
- Yield the entities that have a component or another.
- Unique
OrDefault View - Shared view over a unique component storage.
- Unique
OrDefault View Mut - Exclusive view over a unique component storage.
- Unique
OrInit View - Shared view over a unique component storage.
- Unique
OrInit View Mut - Exclusive view over a unique component storage.
- Unique
Storage - Unique storage.
- Unique
View - Shared view over a unique component storage.
- Unique
View Mut - Exclusive view over a unique component storage.
- View
- Shared view over a component storage.
- ViewMut
- Exclusive view over a component storage.
- Workload
- Keeps information to create a workload.
- World
World
contains all data this library will manipulate.
Enums§
Traits§
- AddComponent
- Defines how components are added to an existing entity.
- AddDistinct
Component - Add component only if not already present.
- AddEntity
- Trait describing how to add a new entity to a storage.
- Component
- Indicates that a
struct
orenum
can be store in theWorld
. - Contains
- Checks if an entity has some components.
- Delete
- Deletes component from entities.
- Get
- Retrieves components based on their type and entity id.
- Into
Iter - Trait used to create iterators.
- Into
Workload - Converts to a collection of systems.
- Into
Workload System - Trait used to add systems to a workload.
- Into
Workload TrySystem - Trait used to add fallible systems to a workload.
- Remove
- Removes component from entities.
- Storage
- Defines common storage operations.
- System
Modificator - Modifies a system.
- Unique
- Indicates that a
struct
orenum
can be store a single time in theWorld
. - Workload
Modificator - Modifies a workload.
Derive Macros§
- Borrow
- Borrow
Info - Component
- Into
Iter - Label
- Requires
Hash
,Debug
,PartialEq
,Clone
- Unique
- World
Borrow