pub trait AddCollection<Key, Value> {
// Required method
fn add_collection(
self,
other: impl IntoIterator<Item = (Key, Value)>,
) -> Self;
}Expand description
A trait for types which support addition on collections.
Required Methods§
Sourcefn add_collection(self, other: impl IntoIterator<Item = (Key, Value)>) -> Self
fn add_collection(self, other: impl IntoIterator<Item = (Key, Value)>) -> Self
Returns a new collection with the sum of the values from the given two collections, for each key.
If the key is missing from one of them, it is treated as zero.
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.