Struct dces::component::EntityComponentManager
source · [−]pub struct EntityComponentManager<E> where
E: EntityStore, { /* private fields */ }
Expand description
The EntityComponentManager represents the main entity and component storage.
Implementations
sourceimpl<E> EntityComponentManager<E> where
E: EntityStore,
impl<E> EntityComponentManager<E> where
E: EntityStore,
sourcepub fn stores(&self) -> (&E, &ComponentStore)
pub fn stores(&self) -> (&E, &ComponentStore)
Returns references to the component store and entity store.
sourcepub fn stores_mut(&mut self) -> (&mut E, &mut ComponentStore)
pub fn stores_mut(&mut self) -> (&mut E, &mut ComponentStore)
Returns mutable references to the component store and entity store.
sourcepub fn component_store(&self) -> &ComponentStore
pub fn component_store(&self) -> &ComponentStore
Return a reference to the component container.
sourcepub fn component_store_mut(&mut self) -> &mut ComponentStore
pub fn component_store_mut(&mut self) -> &mut ComponentStore
Return a mutable reference to the component container.
sourcepub fn entity_store(&mut self) -> &mut E
pub fn entity_store(&mut self) -> &mut E
Return a reference to the entity container.
sourcepub fn entity_store_mut(&mut self) -> &mut E
pub fn entity_store_mut(&mut self) -> &mut E
Return a mutable reference to the entity container.
sourcepub fn create_entity(&mut self) -> EntityBuilder<'_, E>
pub fn create_entity(&mut self) -> EntityBuilder<'_, E>
Creates a new entity and returns a returns an TypeEntityBuilder
.
sourcepub fn register_entity(&mut self, entity: impl Into<Entity>)
pub fn register_entity(&mut self, entity: impl Into<Entity>)
Register a new entity
.
sourcepub fn remove_entity(&mut self, entity: impl Into<Entity>)
pub fn remove_entity(&mut self, entity: impl Into<Entity>)
Removes a entity
from the manager.
Trait Implementations
sourceimpl<E: Default> Default for EntityComponentManager<E> where
E: EntityStore,
impl<E: Default> Default for EntityComponentManager<E> where
E: EntityStore,
sourcefn default() -> EntityComponentManager<E>
fn default() -> EntityComponentManager<E>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<E> !RefUnwindSafe for EntityComponentManager<E>
impl<E> !Send for EntityComponentManager<E>
impl<E> !Sync for EntityComponentManager<E>
impl<E> Unpin for EntityComponentManager<E> where
E: Unpin,
impl<E> !UnwindSafe for EntityComponentManager<E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more