pub trait GroupFromIterator<V> {
// Required method
fn group_from_iter<I>(iter: I) -> Self
where I: IntoIterator<Item = V>;
}Expand description
Implemented by mapping types (HashMap and BTreeMap)
such that they can populated by an iterator.
Roughly analogous to the FromIterator trait.
Required Methods§
Sourcefn group_from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = V>,
fn group_from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = V>,
Builds a grouped collection from an iterator of key,value tuples. Collections are extended in the order the values appear in the iterator.
It’s recommended to call an iterator’s group() method
rather than call this directly.
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.