pub trait EachCount {
type Item;
// Required methods
fn each_count(self) -> HashMap<Self::Item, u64>
where Self::Item: Hash + Eq;
fn each_count_by<K>(
self,
selector: fn(_: Self::Item) -> K,
) -> HashMap<K, u64>
where K: Eq + Hash;
}
Required Associated Types§
Required Methods§
Sourcefn each_count(self) -> HashMap<Self::Item, u64>
fn each_count(self) -> HashMap<Self::Item, u64>
gives a count of each unique item that exist
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.