[][src]Trait oxydyze::core::component::ComponentStorage

pub trait ComponentStorage<C: Component> {
    fn new(capacity: Option<usize>) -> Self;
fn fetch_by_id(&self, id: EntityId) -> Option<&C>;
fn fetch_mut_by_id(&mut self, id: EntityId) -> Option<&mut C>;
fn remove(&mut self, id: EntityId);
fn add(&mut self, component: C, id: EntityId);
fn ids_with(&self) -> Vec<EntityId>;
fn all(&self) -> Vec<&C>; }

Required methods

fn new(capacity: Option<usize>) -> Self

fn fetch_by_id(&self, id: EntityId) -> Option<&C>

fn fetch_mut_by_id(&mut self, id: EntityId) -> Option<&mut C>

fn remove(&mut self, id: EntityId)

fn add(&mut self, component: C, id: EntityId)

fn ids_with(&self) -> Vec<EntityId>

fn all(&self) -> Vec<&C>

Loading content...

Implementors

impl<C: Component> ComponentStorage<C> for SparseStorage<C>[src]

Loading content...