StableRemove

Trait StableRemove 

Source
pub trait StableRemove<K>: Remove<K> { }
Expand description

Removing an element under a key using Remove::remove() does not invalidate any other key.

Plain vectors such as [Vec] cannot implement this trait because removing elements invalidates keys of other elements. Some contiguous data structures, such as [stable_vec::StableVec] and [thunderdome::Arena], bypass this limitation by placing a tombstone element in place of the removed element.

Implementations on Foreign Types§

Source§

impl<K> StableRemove<K> for BTreeSet<K>
where K: Ord,

Source§

impl<K> StableRemove<K> for HashSet<K>
where K: Eq + Hash,

Source§

impl<K> StableRemove<K> for RTree<K>

Source§

impl<K, V> StableRemove<K> for BTreeMap<K, V>
where K: Ord,

Source§

impl<K, V> StableRemove<K> for HashMap<K, V>
where K: Eq + Hash,

Source§

impl<K, V, C> StableRemove<K> for RTreed<K, V, C>
where K: Clone + PartialEq, V: Clone + PartialEq + RTreeObject, C: StableRemove<K, Item = V>,

Source§

impl<V> StableRemove<Index> for Arena<V>

Source§

impl<V, C> StableRemove<usize> for StableVecFacade<V, C>
where C: Core<V>,

Implementors§

Source§

impl<C: Keyed + Map + StableRemove<C::Key>, EC: Keyed<Key = C::Key> + Map<Item = C::Item> + Insert<C::Key> + StableRemove<C::Key>> StableRemove<<C as Keyed>::Key> for Recorder<C, EC>
where C::Key: Clone, C::Item: Clone,