Module specs::prelude [] [src]

Commonly used traits, structs, enums, etc. for ease of use. Prelude module

Contains all of the most common traits, structures,

Re-exports

pub use join::Join;
pub use join::ParJoin;
pub use changeset::ChangeSet;
pub use storage::Storage;
pub use world::EntityBuilder;
pub use world::World;

Structs

AsyncDispatcher

Like, Dispatcher but works asynchronously.

BitSet

A BitSet is a simple set designed to track entity indices for which a certain component exists. It does not track the Generation of the entities that it contains.

DenseVecStorage

Dense vector storage. Has a redirection 2-way table between entities and components, allowing to leave no gaps within the data.

Dispatcher

The dispatcher struct, allowing systems to be executed in parallel.

DispatcherBuilder

Builder for the Dispatcher.

Entity

Entity type, as seen by the user.

FlaggedStorage

Wrapper storage that tracks modifications, insertions, and removals of components through an EventChannel.

InsertedFlag

Flag with additional type safety against which kind of operations were done.

LazyUpdate

Lazy updates can be used for world updates that need to borrow a lot of resources and as such should better be done at the end. They work lazily in the sense that they are dispatched when calling world.maintain(). Please note that the provided methods take &self so there's no need to fetch LazyUpdate mutably. This resource is added to the world by default.

ModifiedFlag

Flag with additional type safety against which kind of operations were done.

Read

Allows to fetch a resource in a system immutably.

ReaderId

The reader id is used by readers to tell the storage where the last read ended.

RemovedFlag

Flag with additional type safety against which kind of operations were done.

Resources

A resource container, which provides methods to access to the contained resources.

VecStorage

Vector storage. Uses a simple Vec. Supposed to have maximum performance for the components mostly present in entities.

Write

Allows to fetch a resource in a system mutably.

Traits

Component

Abstract component type. Doesn't have to be Copy or even Clone.

RunNow

Trait for fetching data and running systems. Automatically implemented for systems.

System

A System, executed with a set of required Resources.

SystemData

A struct implementing system data indicates that it bundles some resources which are required for the execution.

Tracked

UnprotectedStorages that track modifications, insertions, and removals of components.

Type Definitions

Entities

A wrapper for a fetched Entities resource. Note that this is just Fetch<Entities>, so you can easily use it in your system:

ReadExpect

Allows to fetch a resource in a system mutably. This will panic if the resource does not exist. Usage of Read or Option<Read> is therefore recommended.

ReadStorage

A storage with read access.

WriteExpect

Allows to fetch a resource in a system mutably. This will panic if the resource does not exist. Usage of Write or Option<Write> is therefore recommended.

WriteStorage

A storage with read and write access.