pub unsafe trait EntitySetIterator: Iterator<Item: EntityEquivalent> { // Provided method fn collect_set<B: FromEntitySetIterator<Self::Item>>(self) -> B where Self: Sized { ... } }
An iterator over a set of unique entities.
Every EntitySetIterator is also EntitySet.
EntitySetIterator
EntitySet
x != y must hold for any 2 elements returned by the iterator. This is always true for iterators that cannot return more than one element.
x != y
Transforms an EntitySetIterator into a collection.
This is a specialized form of collect, for collections which benefit from the uniqueness guarantee. When present, this should always be preferred over collect.
collect