pub trait NestedHashMapExtensions<K, K2, V> {
// Required method
fn insert_into_nested(
&mut self,
outer_key: K,
inner_key: K2,
inner_value: V,
);
}Required Methods§
Sourcefn insert_into_nested(&mut self, outer_key: K, inner_key: K2, inner_value: V)
fn insert_into_nested(&mut self, outer_key: K, inner_key: K2, inner_value: V)
For use with a hashmap within a hashmap, takes an outer and inner key, and an inner value
- if the outer key exists with and inner hashmap the key-value pair is inserted to the existing hashmap.
- a new inner hashmap is created with the key-value pair if the outer key does not exist.