Skip to main content

FromEntitySetIterator

Trait FromEntitySetIterator 

Source
pub trait FromEntitySetIterator<A: EntityEquivalent>: FromIterator<A> {
    // Required method
    fn from_entity_set_iter<T: EntitySet<Item = A>>(set_iter: T) -> Self;
}
Expand description

Conversion from an EntitySetIterator.

Some collections, while they can be constructed from plain iterators, benefit strongly from the additional uniqueness guarantee EntitySetIterator offers. Mirroring Iterator::collect/FromIterator::from_iter, EntitySetIterator::collect_set and FromEntitySetIterator::from_entity_set_iter can be used for construction.

See also: EntitySet.

Required Methods§

Source

fn from_entity_set_iter<T: EntitySet<Item = A>>(set_iter: T) -> Self

Creates a value from an EntitySetIterator.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: EntityEquivalent + Hash, S: BuildHasher + Default> FromEntitySetIterator<T> for HashSet<T, S>

Source§

fn from_entity_set_iter<I: EntitySet<Item = T>>(set_iter: I) -> Self

Source§

impl<T: EntityEquivalent> FromEntitySetIterator<T> for Box<UniqueEntityEquivalentSlice<T>>

Source§

fn from_entity_set_iter<I: EntitySet<Item = T>>(iter: I) -> Self

Implementors§