pub type EntityHashSet = EntityEquivalentHashSet<Entity>;Expand description
An HashSet pre-configured to use EntityHash hashing with an Entity.
Aliased Type§
pub struct EntityHashSet(/* private fields */);Trait Implementations§
Source§impl RelationshipSourceCollection for EntityHashSet
impl RelationshipSourceCollection for EntityHashSet
Source§type SourceIter<'a> = Copied<Iter<'a, Entity>>
type SourceIter<'a> = Copied<Iter<'a, Entity>>
The type of iterator returned by the
iter method. Read moreSource§fn reserve(&mut self, additional: usize)
fn reserve(&mut self, additional: usize)
Reserves capacity for at least
additional more entities to be inserted. Read moreSource§fn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Returns an instance with the given pre-allocated entity
capacity. Read moreSource§fn remove(&mut self, entity: Entity) -> bool
fn remove(&mut self, entity: Entity) -> bool
Removes the given
entity from the collection. Read moreSource§fn iter(&self) -> Self::SourceIter<'_>
fn iter(&self) -> Self::SourceIter<'_>
Iterates all entities in the collection.
Source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Attempts to save memory by shrinking the capacity to fit the current length. Read more
Source§fn extend_from_iter(&mut self, entities: impl IntoIterator<Item = Entity>)
fn extend_from_iter(&mut self, entities: impl IntoIterator<Item = Entity>)
Add multiple entities to collection at once. Read more
Source§fn source_to_remove_before_add(&self) -> Option<Entity>
fn source_to_remove_before_add(&self) -> Option<Entity>
For one-to-one relationships, returns the entity that should be removed before adding a new one.
Returns
None for one-to-many relationships or when no entity needs to be removed.Source§impl WorldEntityFetch for &EntityHashSet
impl WorldEntityFetch for &EntityHashSet
Source§type Ref<'w> = EntityEquivalentHashMap<Entity, EntityRef<'w>>
type Ref<'w> = EntityEquivalentHashMap<Entity, EntityRef<'w>>
The read-only reference type returned by
WorldEntityFetch::fetch_ref.Source§type Mut<'w> = EntityEquivalentHashMap<Entity, EntityMut<'w>>
type Mut<'w> = EntityEquivalentHashMap<Entity, EntityMut<'w>>
The mutable reference type returned by
WorldEntityFetch::fetch_mut.Source§type DeferredMut<'w> = EntityEquivalentHashMap<Entity, EntityMut<'w>>
type DeferredMut<'w> = EntityEquivalentHashMap<Entity, EntityMut<'w>>
The mutable reference type returned by
WorldEntityFetch::fetch_deferred_mut,
but without structural mutability.