pub trait StoreBulkMut<K, V>: StoreMut<K, V> {
// Required methods
fn lm_retain<F>(&mut self, predicate: F)
where F: FnMut(&K, &V) -> bool;
fn lm_extend<I>(&mut self, other: I)
where I: IntoIterator<Item = (K, V)>;
}
Required Methods§
Sourcefn lm_extend<I>(&mut self, other: I)where
I: IntoIterator<Item = (K, V)>,
fn lm_extend<I>(&mut self, other: I)where
I: IntoIterator<Item = (K, V)>,
Extends this store with items from an iterator.
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§
Source§impl<K: Ord, V> StoreBulkMut<K, V> for Vec<(K, V)>
impl<K: Ord, V> StoreBulkMut<K, V> for Vec<(K, V)>
Source§fn lm_extend<I>(&mut self, iter: I)
fn lm_extend<I>(&mut self, iter: I)
Extends this store with items from an iterator.
It uses a two-pass (sort + dedup) approach to avoid any potential quadratic costs.
The asymptotic worst case complexity is O((n + m) log(n + m)), where n
is the number of elements already in self
and m
is the number of elements
in the iterator. The best case complexity is O(m), when the input iterator is
already sorted, keys aren’t duplicated and all keys sort after the existing ones.