Struct entity_data::GlobalComponentAccess
source · 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> !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