Struct specs::world::EntitiesRes[][src]

pub struct EntitiesRes { /* fields omitted */ }
Expand description

The entities of this ECS. This is a resource, stored in the World. If you just want to access it in your system, you can also use the Entities type def.

Please note that you should never get this mutably in a system, because it would block all the other systems.

You need to call World::maintain after creating / deleting entities with this struct.

Implementations

Creates a new entity atomically. This will be persistent as soon as you call World::maintain.

If you want a lazy entity builder, take a look at LazyUpdate::create_entity.

In case you have access to the World, you can also use World::create_entity which creates the entity and the components immediately.

Returns an iterator which creates new entities atomically. They will be persistent as soon as you call World::maintain.

Similar to the create method above this creates an entity atomically, and then returns a builder which can be used to insert components into various storages if available.

Deletes an entity atomically. The associated components will be deleted as soon as you call World::maintain.

Returns an entity with a given id. There’s no guarantee for validity, meaning the entity could be not alive.

Returns true if the specified entity is alive.

Trait Implementations

Formats the value using the given formatter. Read more

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

Type of joined bit mask.

Type of joined components.

Type of joined storages.

Open this join by returning the mask and the storages. Read more

Get a joined component value by a given index. Read more

Create a joined iterator over the contents.

Returns a Join-able structure that yields all indices, returning None for all missing elements and Some(T) for found elements. Read more

If this Join typically returns all indices in the mask, then iterating over only it or combined with other joins that are also dangerous will cause the JoinIter/ParJoin to go through all indices which is usually not what is wanted and will kill performance. Read more

Create a joined parallel iterator over the contents.

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

Performs the conversion.

Performs the conversion.

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

Tries to create the default.

Calls try_default and panics on an error case.

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.