pub type EntityIndexSet = EntityEquivalentIndexSet<Entity>;Expand description
An IndexSet pre-configured to use EntityHash hashing with an Entity.
Aliased Type§
pub struct EntityIndexSet(/* private fields */);Trait Implementations§
Source§impl MapEntities for EntityIndexSet
impl MapEntities for EntityIndexSet
Source§fn map_entities<E: EntityMapper>(&mut self, entity_mapper: &mut E)
fn map_entities<E: EntityMapper>(&mut self, entity_mapper: &mut E)
Source§impl RelationshipSourceCollection for EntityIndexSet
impl RelationshipSourceCollection for EntityIndexSet
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.