[][src]Crate world_dispatcher

Resources MUST implement default Resources MAY use Mutex<Arc> to be Send+Sync Resources MUST be 'static

Re-exports

pub use crate::*;
pub use crate::*;
pub use crate::*;
pub use crate::*;
pub use crate::*;
pub use crate::*;

Macros

system_error

Returns a custom error from a System during execution.

Structs

Dispatcher

A dispatcher is used to execute a collection of System in order and possibly in parallel using World's resources. A dispatcher automatically avoids mutable borrow collisions which would normally lead to data corruption, dead locks and more.

DispatcherBuilder

A builder that accumulates systems to be inserted into a Dispatcher.

System

Struct used to run a system function using the world. This struct is also used internally by the Dispatcher to coherent execution sequence.

World

Contains data indexed by type. World allows to dynamically enforce the rust rules of borrowing and ownership at runtime:

Enums

EcsError

The types of errors a System can create.

Traits

IntoSystem

Converts a function into a System. It is required to execute a function automatically from World's resources. This trait is automatically implemented for functions taking 12 arguments or less where:

Type Definitions

SystemResult

The result of a System's execution. Returns Ok(()) on success, EcsError on failure. To return a custom error from a system, use the system_error! macro.