Struct constellation::EntitiesTransaction
[−]
[src]
pub struct EntitiesTransaction<'a> { /* fields omitted */ }
An entity transaction allows concurrent creations and deletions of entities
from an Entities
.
Methods
impl<'a> EntitiesTransaction<'a>
[src]
fn create(&mut self) -> Entity
Creates a new Entity
.
This Entity
can immediately be used to register data with resources,
and the calling system may destroy the entity, but other systems running
concurrently will not observe the entity's creation.
fn destroy(&mut self, entity: Entity)
Destroys an Entity
.
Entity destructions are deferred until after the system has completed execution. All related data stored in entity resources will also be removed at this time.
fn is_alive(&self, entity: &Entity) -> bool
Determines if the given Entity
is still alive.
fn by_index(&self, index: Index) -> Entity
Gets the currently living Entity
with the given Index
.
fn to_change_set(self) -> EntityChangeSet
Converts this transaction into a change set, consuming the transaction in the process.