Struct entity_table::ComponentTable
source · [−]pub struct ComponentTable<T> { /* private fields */ }Implementations
sourceimpl<T> ComponentTable<T>
impl<T> ComponentTable<T>
pub fn clear(&mut self)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn entries(&self) -> &ComponentTableEntries<T>
pub fn insert(&mut self, entity: Entity, data: T) -> Option<T>
pub fn contains(&self, entity: Entity) -> bool
pub fn remove(&mut self, entity: Entity) -> Option<T>
pub fn get(&self, entity: Entity) -> Option<&T>
pub fn get_mut(&mut self, entity: Entity) -> Option<&mut T>
pub fn iter(&self) -> ComponentTableIter<'_, T>ⓘNotable traits for ComponentTableIter<'a, T>impl<'a, T> Iterator for ComponentTableIter<'a, T> type Item = (Entity, &'a T);
pub fn iter_mut(&mut self) -> ComponentTableIterMut<'_, T>ⓘNotable traits for ComponentTableIterMut<'a, T>impl<'a, T> Iterator for ComponentTableIterMut<'a, T> type Item = (Entity, &'a mut T);
pub fn entities(&self) -> impl '_ + Iterator<Item = Entity>
Trait Implementations
sourceimpl<T: Clone> Clone for ComponentTable<T>
impl<T: Clone> Clone for ComponentTable<T>
sourcefn clone(&self) -> ComponentTable<T>
fn clone(&self) -> ComponentTable<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<T: Debug> Debug for ComponentTable<T>
impl<T: Debug> Debug for ComponentTable<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ComponentTable<T>where
T: RefUnwindSafe,
impl<T> Send for ComponentTable<T>where
T: Send,
impl<T> Sync for ComponentTable<T>where
T: Sync,
impl<T> Unpin for ComponentTable<T>where
T: Unpin,
impl<T> UnwindSafe for ComponentTable<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more