Struct zcomponents::ComponentContainer [−][src]
Methods
impl<Id: Hash + Eq + Copy + Debug, V: Clone> ComponentContainer<Id, V>
[src]
impl<Id: Hash + Eq + Copy + Debug, V: Clone> ComponentContainer<Id, V>
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn get_opt(&self, id: Id) -> Option<&V>
[src]
pub fn get_opt(&self, id: Id) -> Option<&V>
pub fn get(&self, id: Id) -> &V
[src]
pub fn get(&self, id: Id) -> &V
Note: panics if there's no such entity.
pub fn get_opt_mut(&mut self, id: Id) -> Option<&mut V>
[src]
pub fn get_opt_mut(&mut self, id: Id) -> Option<&mut V>
pub fn get_mut(&mut self, id: Id) -> &mut V
[src]
pub fn get_mut(&mut self, id: Id) -> &mut V
Note: panics if there's no such entity.
pub fn insert(&mut self, id: Id, data: V)
[src]
pub fn insert(&mut self, id: Id, data: V)
Note: panics if there's no such entity.
pub fn remove(&mut self, id: Id)
[src]
pub fn remove(&mut self, id: Id)
Note: panics if there's no such entity.
ⓘImportant traits for IdIter<'a, Id, V>pub fn ids(&self) -> IdIter<Id, V>
[src]
ⓘImportant traits for IdIter<'a, Id, V>
pub fn ids(&self) -> IdIter<Id, V>
pub fn ids_collected(&self) -> Vec<Id>
[src]
pub fn ids_collected(&self) -> Vec<Id>
Note: Allocates Vec in heap.
Trait Implementations
impl<Id: Debug + Hash + Eq, V: Debug> Debug for ComponentContainer<Id, V>
[src]
impl<Id: Debug + Hash + Eq, V: Debug> Debug for ComponentContainer<Id, V>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<Id: Clone + Hash + Eq, V: Clone> Clone for ComponentContainer<Id, V>
[src]
impl<Id: Clone + Hash + Eq, V: Clone> Clone for ComponentContainer<Id, V>
fn clone(&self) -> ComponentContainer<Id, V>
[src]
fn clone(&self) -> ComponentContainer<Id, V>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<Id: Hash + Eq + Copy + Debug, V: Clone> Default for ComponentContainer<Id, V>
[src]
impl<Id: Hash + Eq + Copy + Debug, V: Clone> Default for ComponentContainer<Id, V>
Auto Trait Implementations
impl<Id, V> Send for ComponentContainer<Id, V> where
Id: Send,
V: Send,
impl<Id, V> Send for ComponentContainer<Id, V> where
Id: Send,
V: Send,
impl<Id, V> Sync for ComponentContainer<Id, V> where
Id: Sync,
V: Sync,
impl<Id, V> Sync for ComponentContainer<Id, V> where
Id: Sync,
V: Sync,