logo
pub struct EntityArena { /* private fields */ }
Expand description

An EntityArena is a collection for holding on to entities. Use it to keep track of sets of entities A global arena exists in which entities can be created and cloned

Implementations

Adds an owned entity to the arena

Removes an entity from the arena using the entity handle, If the entity was in the arena it is returned, otherwise None.

Schedules an entity for destruction using the entity handle, Will be destroyed on the next call to destroy_pending_entities. If the entity is in the arena a handle to it is returned, otherwise None.

Destroys all entities that have been scheduled for destruction using the schedule_for_destruction function.

Destroys all entities in the arena

Returns the global entity arena, used by Entity::create functions

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 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.