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§
Sourcefn from_entity_set_iter<T: EntitySet<Item = A>>(set_iter: T) -> Self
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", so this trait is not object safe.