pub struct World { /* private fields */ }
Expand description

A collection of resources and systems.

The World is the executor of your systems and async computations.

Contains Entities and Components as resources, by default.

Implementations

Add a plugin to the world, instantiating any missing resources or systems.

Errs

Errs if the plugin requires resources that cannot be created by default.

Add a syncronous system.

Errs

Errs if expected resources must first be added to the world.

Add a syncronous system that has a dependency on one or more other syncronous systems.

Errs

Errs if expected resources must first be added to the world.

Add a syncronous system barrier.

Any systems added after the barrier will be scheduled after the systems added before the barrier.

Returns whether a resources of the given type exists in the world.

Spawn a non-system asynchronous task.

Conduct a world tick.

Calls World::tick_async, then World::tick_sync, then World::tick_lazy.

Panics

Panics if any sub-tick step returns an error

Just tick the synchronous systems.

Just tick the async futures, including sending resources to async systems.

Applies lazy world updates.

Also runs component entity and archetype upkeep.

Attempt to get a reference to one resource.

Attempt to get a mutable reference to one resource.

Run all system and non-system futures until they have all finished or one system has erred, whichever comes first.

Returns the scheduled systems’ names, collated by batch.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.