Expand description
Prelude module
Contains all of the most common traits, structures,
Re-exports§
pub use crate::join::Join;
pub use crate::join::LendJoin;
pub use crate::join::ParJoin;
pub use crate::changeset::ChangeSet;
pub use crate::storage::ComponentEvent;
pub use crate::storage::DefaultVecStorage;
pub use crate::storage::DenseVecStorage;
pub use crate::storage::FlaggedStorage;
pub use crate::storage::HashMapStorage;
pub use crate::storage::NullStorage;
pub use crate::storage::ReadStorage;
pub use crate::storage::Storage;
pub use crate::storage::Tracked;
pub use crate::storage::VecStorage;
pub use crate::storage::WriteStorage;
pub use crate::world::Builder;
pub use crate::world::Component;
pub use crate::world::Entities;
pub use crate::world::Entity;
pub use crate::world::EntityBuilder;
pub use crate::world::LazyUpdate;
pub use crate::world::WorldExt;
Structs§
- Async
Dispatcher - Like,
Dispatcher
but works asynchronously. - BitSet
- A
BitSet
is a simple set designed to track which indices are placed into it. - Dispatcher
- The dispatcher struct, allowing systems to be executed in parallel.
- Dispatcher
Builder - Builder for the
Dispatcher
. - Read
- Allows to fetch a resource in a system immutably.
- Reader
Id - A reader ID which represents a subscription to the events pushed to the
EventChannel
. - Resource
Id - The id of a
Resource
, which simply wraps a type id and a “dynamic ID”. The “dynamic ID” is usually just left0
, and, unless such documentation says otherwise, other libraries will assume that it is always0
; non-zero IDs are only used for special resource types that are specifically defined in a more dynamic way, such that resource types can essentially be created at run time, without having different static types. - Static
Accessor - The static accessor that is used for
SystemData
. - World
- A Resource container, which provides methods to insert, access and manage the contained resources.
- Write
- Allows to fetch a resource in a system mutably.
Traits§
- Accessor
- A trait for accessing read/write multiple resources from a system. This can be used to create dynamic systems that don’t specify what they fetch at compile-time.
- Parallel
Iterator - Parallel version of the standard iterator trait.
- Resource
- A resource is a data slot which lives in the
World
can only be accessed according to Rust’s typical borrowing model (one writer xor multiple readers). - RunNow
- Trait for fetching data and running systems. Automatically implemented for systems.
- System
- A
System
, executed with a set of requiredResource
s. - System
Data - A static system data that can specify its dependencies at statically (at
compile-time). Most system data is a
SystemData
, theDynamicSystemData
type is only needed for very special setups.
Type Aliases§
- Read
Expect - Allows to fetch a resource in a system immutably.
This will panic if the resource does not exist.
Usage of
Read
orOption<Read>
is therefore recommended. - Write
Expect - Allows to fetch a resource in a system mutably.
This will panic if the resource does not exist.
Usage of
Write
orOption<Write>
is therefore recommended.
Derive Macros§
- System
Data - Used to
#[derive]
the traitSystemData
.