[][src]Trait dces::component::ComponentStore

pub trait ComponentStore {
    type Components;
    fn append(&mut self, entity: Entity, components: Self::Components);
fn remove_entity(&mut self, entity: impl Into<Entity>);
fn print_entity(&self, entity: impl Into<Entity>); }

This trait is used to define a custom component store.

Associated Types

Loading content...

Required methods

fn append(&mut self, entity: Entity, components: Self::Components)

fn remove_entity(&mut self, entity: impl Into<Entity>)

Removes and entity from the store.

fn print_entity(&self, entity: impl Into<Entity>)

Print infos about the given entity.

Loading content...

Implementors

impl ComponentStore for StringComponentStore[src]

type Components = (HashMap<String, Box<dyn Any>>, HashMap<String, (Entity, String)>)

impl ComponentStore for TypeComponentStore[src]

type Components = (HashMap<TypeId, Box<dyn Any>>, HashMap<TypeId, Entity>)

Loading content...