Crate shipyard[][src]

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
  • serde1 — adds (de)serialization support with serde
  • thread_local — add methods and types required to work with !Send and !Sync components
  • std (default) — let shipyard use the standard library

Modules

borrow

Allows access to helper types needed to implement Borrow.

error

All error types.

info

Types for displaying workload information.

iter

Iterators types and traits.

Structs

AllStorages

Contains all storages present in the World.

AllStoragesViewMut

Exclusive view over AllStorages.

BulkEntityIter

Iterator over newly bulk added entities.

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.

NonSendthread_local

Type used to access !Send storages.

NonSendSyncthread_local

Type used to access !Send + !Sync storages.

NonSyncthread_local

Type used to access !Sync storages.

Not

Used to filter out components.

Ref

Wraps an AtomicRefcell’s shared borrow.

RefMut

Wraps an AtomicRefcell’s exclusive borrow.

SparseArray

Internal part of a SparseSet.

SparseSet

Default component storage.

SparseSetDrain

A draining iterator for SparseSet<T>.

StorageMemoryUsage

A trait to querry the amount of memory a storage uses.

Unique

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

Used to create a WorkloadBuilder.

WorkloadBuilder

Keeps information to create a workload.

WorkloadSystem

Self contained system that may be inserted into a WorkloadBuilder.

World

World contains all data this library will manipulate.

Enums

Mutability

Describes if a storage is borrowed exlusively or not.
It is used to display workloads’ borrowing information.

StorageId

Id of a storage, can be a TypeId or u64.

Traits

AddComponent

Defines how components are added to an existing entity.

AddEntity

Trait describing how to add a new entity to a storage.

AllStoragesBorrow

Allows a type to be borrowed by AllStorages::borrow and AllStorages::run.

Borrow

Allows a type to be borrowed by World::borrow, World::run and worklaods.

BorrowInfo

Explains to a workload which storage are borrowed by a system.

BulkReserve

Reserves memory for a set of entities.

Contains

Checks if an entity has some components.

CustomStorageAccess

Low level access to storage.

Delete

Trait used to delete component(s).

Get

Retrives components based on their type and entity id.

IntoBorrow

Transforms a view into a helper type. This allows workloads to have the current syntax.

IntoFastIter

Trait used to create iterators.
Yields &mut T for mutable components. Does not work with storage tracking modification.

IntoIter

Trait used to create iterators.
Yields Mut for mutable components.

IntoWithId

Creates iterator returning EntityId.

IntoWorkloadSystem

Trait used to add systems to a workload.

Remove

Removes component from entities.

Storage

Defines common storage operations.