count_by
Counts the elements of items per key returned by key.
Import
Section titled “Import”Cargo feature array (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
items | &[T] | The elements to count. |
key | impl FnMut(&T) -> K | Returns the key to count each element under. |
Returns
Section titled “Returns”HashMap<K, usize>
