[][src]Struct orbtk::EntityComponentManager

pub struct EntityComponentManager<E, C> where
    C: ComponentStore,
    E: EntityStore
{ /* fields omitted */ }

The EntityComponentManager represents the main entity and component storage.

Methods

impl<E, C> EntityComponentManager<E, C> where
    C: ComponentStore,
    E: EntityStore
[src]

pub fn new(entity_store: E, component_store: C) -> EntityComponentManager<E, C>[src]

Create a new entity component manager.

pub fn stores(&self) -> (&E, &C)[src]

Returns references to the component store and entity store.

pub fn stores_mut(&mut self) -> (&mut E, &mut C)[src]

Returns mutable references to the component store and entity store.

pub fn component_store(&self) -> &C[src]

Return a reference to the component container.

pub fn component_store_mut(&mut self) -> &mut C[src]

Return a mutable reference to the component container.

pub fn entity_store(&mut self) -> &mut E[src]

Return a reference to the entity container.

pub fn entity_store_mut(&mut self) -> &mut E[src]

Return a mutable reference to the entity container.

pub fn create_entity(&mut self) -> EntityBuilder<E, C>[src]

Creates a new entity and returns a returns an TypeEntityBuilder.

pub fn register_entity(&mut self, entity: impl Into<Entity>)[src]

Register a new entity.

pub fn remove_entity(&mut self, entity: impl Into<Entity>)[src]

Removes a entity from the manager.

Trait Implementations

impl<E, C> Default for EntityComponentManager<E, C> where
    C: Default + ComponentStore,
    E: Default + EntityStore
[src]

Auto Trait Implementations

impl<E, C> Send for EntityComponentManager<E, C> where
    C: Send,
    E: Send

impl<E, C> Sync for EntityComponentManager<E, C> where
    C: Sync,
    E: Sync

impl<E, C> Unpin for EntityComponentManager<E, C> where
    C: Unpin,
    E: Unpin

impl<E, C> UnwindSafe for EntityComponentManager<E, C> where
    C: UnwindSafe,
    E: UnwindSafe

impl<E, C> RefUnwindSafe for EntityComponentManager<E, C> where
    C: RefUnwindSafe,
    E: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> Component for E where
    E: Any
[src]

impl<T> SetParameter for T