pub trait IdMapExt<K: KeyType, V> {
// Required methods
fn insert_value(&mut self, value: V) -> K;
fn windows(&self, size: usize) -> IntoIter<Vec<(K, &V)>>;
}Expand description
Operations on an IdMap that IndexMap does not provide directly.
Required Methods§
Sourcefn insert_value(&mut self, value: V) -> K
fn insert_value(&mut self, value: V) -> K
Insert value under a freshly generated default id, returning that id.
The id is max(existing ids) + 1, so existing keys never shift and the
result never collides with a live entry.