Skip to main content

DuplicateInsertsFirstWinsMap

Trait DuplicateInsertsFirstWinsMap 

Source
pub trait DuplicateInsertsFirstWinsMap<K, V> {
    // Required methods
    fn new(size_hint: Option<usize>) -> Self;
    fn insert(&mut self, key: K, value: V);
}

Required Methods§

Source

fn new(size_hint: Option<usize>) -> Self

Source

fn insert(&mut self, key: K, value: V)

Insert the value into the map, if there is not already an existing value

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.

Implementors§

Source§

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

Source§

impl<K, V, S> DuplicateInsertsFirstWinsMap<K, V> for HashMap<K, V, S>
where K: Eq + Hash, S: BuildHasher + Default,

Available on crate feature std only.