Trait UpdateOr
hashmap_ext
pub trait UpdateOr<K, V> { fn update_or<F>(&mut self, key: &K, f: F, default: V) where F: FnOnce(&mut V); }
fn update_or<F>(&mut self, key: &K, f: F, default: V) where F: FnOnce(&mut V),
impl<K, V> UpdateOr<K, V> for HashMap<K, V> where K: Hash + Eq, K: Copy,