Trait qecs::core::ComponentStore
[−]
[src]
pub trait ComponentStore: StoreBase + _ComponentStore<'a, _Value = Self::Value, _Value = Self::Value> + _ComponentStore<'a> { type Value: Component; fn assign<T>(
&mut self,
id: Valid<'id, Self::Id>,
com: T
) -> Option<Self::Value>
where
T: Into<Self::Value>; fn release(&mut self, id: Valid<'id, Self::Id>) -> Option<Self::Value>; fn get(&self, id: Valid<'id, Self::Id>) -> Option<&Self::Value>; fn get_mut(&mut self, id: Valid<'id, Self::Id>) -> Option<&mut Self::Value>; fn values(&'a self) -> Self::Values; fn values_mut(&'a mut self) -> Self::ValuesMut; }
Associated Types
Required Methods
fn assign<T>(&mut self, id: Valid<'id, Self::Id>, com: T) -> Option<Self::Value> where
T: Into<Self::Value>,
T: Into<Self::Value>,
fn release(&mut self, id: Valid<'id, Self::Id>) -> Option<Self::Value>
fn get(&self, id: Valid<'id, Self::Id>) -> Option<&Self::Value>
Returns None
if id
is not assigned.
fn get_mut(&mut self, id: Valid<'id, Self::Id>) -> Option<&mut Self::Value>
Returns None
if id
is not assigned.
fn values(&'a self) -> Self::Values
fn values_mut(&'a mut self) -> Self::ValuesMut
Implementors
impl<S> ComponentStore for S where
S: DerefMut + ServiceBase,
<S as Deref>::Target: ComponentStore,impl<ID, C> ComponentStore for BTreeMapStore<ID, C> where
ID: Id,
C: Component,impl<ID, C> ComponentStore for VecMapStore<ID, C> where
ID: IdWithIndex,
C: Component,impl<S> ComponentStore for WithDirtyState<S> where
S: ComponentStore,