Crate shipyard

Source
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 derive Component
  • 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 and World::get.
get_unique
Trait bound for AllStorages::get_unique and World::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.
AllStoragesView
Shared view over AllStorages.
AllStoragesViewMut
Exclusive view over AllStorages.
Entities
Entities holds the EntityIds to all entities: living, removed and dead.
EntitiesView
Shared view over Entities storage.
EntitiesViewMut
Exclusive view over Entities storage.
EntityId
Handle to an entity.
Inserted
Wrapper type allowing iterating over inserted flagged components.
InsertedOrModified
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.
UniqueOrDefaultView
Shared view over a unique component storage.
UniqueOrDefaultViewMut
Exclusive view over a unique component storage.
UniqueOrInitView
Shared view over a unique component storage.
UniqueOrInitViewMut
Exclusive view over a unique component storage.
UniqueStorage
Unique storage.
UniqueView
Shared view over a unique component storage.
UniqueViewMut
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§

OneOfTwo
Returned when iterating with Or filter.
StorageId
Id of a storage, can be a TypeId or u64.

Traits§

AddComponent
Defines how components are added to an existing entity.
AddDistinctComponent
Add component only if not already present.
AddEntity
Trait describing how to add a new entity to a storage.
Component
Indicates that a struct or enum can be store in the World.
Contains
Checks if an entity has some components.
Delete
Deletes component from entities.
Get
Retrieves components based on their type and entity id.
IntoIter
Trait used to create iterators.
IntoWorkload
Converts to a collection of systems.
IntoWorkloadSystem
Trait used to add systems to a workload.
IntoWorkloadTrySystem
Trait used to add fallible systems to a workload.
Remove
Removes component from entities.
Storage
Defines common storage operations.
SystemModificator
Modifies a system.
Unique
Indicates that a struct or enum can be store a single time in the World.
WorkloadModificator
Modifies a workload.

Derive Macros§

Borrow
BorrowInfo
Component
IntoIter
Label
Requires Hash, Debug, PartialEq, Clone
Unique
WorldBorrow