pub trait Map<K, V> {
// Required method
fn insert(&mut self, key: K, value: V);
}Expand description
A trait for “map” types (such as HashMap) that you can collect
into with an AggregateMap.
Implementations of this trait are provided for std maps, but if you have a custom map type you
can implement this trait for it to be able to use it with AggregateMap.
Implementors of this trait will generally have a key of K, but a value of some collection type
(like Vec or HashSet), which contains multiple values of type
V.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".