pub struct GlobalComponentAccess<'a, C> { /* private fields */ }Implementations§
Source§impl<'a, C: Component> GlobalComponentAccess<'a, C>
impl<'a, C: Component> GlobalComponentAccess<'a, C>
Sourcepub fn contains(&self, entity_id: &EntityId) -> bool
pub fn contains(&self, entity_id: &EntityId) -> bool
Returns true if the storage contains the specified entity.
Sourcepub fn get(&self, entity_id: &EntityId) -> Option<&C>
pub fn get(&self, entity_id: &EntityId) -> Option<&C>
Returns a reference to the component C of the specified entity id.
Sourcepub fn count_entities(&self) -> usize
pub fn count_entities(&self) -> usize
Returns total number of entities with the component C.
Auto Trait Implementations§
impl<'a, C> Freeze for GlobalComponentAccess<'a, C>
impl<'a, C> !RefUnwindSafe for GlobalComponentAccess<'a, C>
impl<'a, C> !Send for GlobalComponentAccess<'a, C>
impl<'a, C> !Sync for GlobalComponentAccess<'a, C>
impl<'a, C> Unpin for GlobalComponentAccess<'a, C>where
C: Unpin,
impl<'a, C> !UnwindSafe for GlobalComponentAccess<'a, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more