pub trait InsertAndIncrement<K, V>: Default {
// Required method
fn insert_and_increment(&mut self, key: K, value: V);
}Expand description
A trait for mapping types to serve as a trivial wrapper over the Entry interface
Required Methods§
Sourcefn insert_and_increment(&mut self, key: K, value: V)
fn insert_and_increment(&mut self, key: K, value: V)
Creates collection with the given key if necessary and increments its total by the given 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.