Insert

Trait Insert 

Source
pub trait Insert<K, V> {
    // Required method
    fn insert(&mut self, key: K, value: V) -> Option<V>;
}
Expand description

A trait which provides a method to insert a key and value into a map

Required Methods§

Source

fn insert(&mut self, key: K, value: V) -> Option<V>

Insert a key and value into the map

Implementations on Foreign Types§

Source§

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

Source§

fn insert(&mut self, key: K, value: V) -> Option<V>

Source§

impl<K: Eq + Hash, V> Insert<K, V> for IndexMap<K, V>

Source§

fn insert(&mut self, key: K, value: V) -> Option<V>

Implementors§