Skip to main content

FromEntitySetIterator

Trait FromEntitySetIterator 

pub trait FromEntitySetIterator<A>: FromIterator<A>{
    // Required method
    fn from_entity_set_iter<T>(set_iter: T) -> Self
       where T: EntitySet<Item = A>;
}
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§

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

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", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<T, S> FromEntitySetIterator<T> for HashSet<T, S>

§

fn from_entity_set_iter<I>(set_iter: I) -> HashSet<T, S>
where I: EntitySet<Item = T>,

Implementors§