Trait EntitySet

Source
pub trait EntitySet: IntoIterator{ }
Expand description

A set of unique entities.

Any element returned by Self::IntoIter will compare non-equal to every other element in the iterator. As a consequence, into_iter() on EntitySet will always produce another EntitySet.

Implementing this trait allows for unique query iteration over a list of entities. See iter_many_unique and iter_many_unique_mut

Note that there is no guarantee of the IntoIterator impl being deterministic, it might return different iterators when called multiple times. Neither is there a guarantee that the comparison trait impls of EntitySet match that of the respective EntitySetIterator (or of a Vec collected from its elements)

Implementors§