[][src]Crate hashbag

An unordered multiset/bag implementation backed by HashMap.

A bag, unlike a set, allows duplicate values, and keeps track of how many duplicates each value holds. This type of collection is often referred to as an unordered multiset (see also C++'s std::unordered_multiset).

This multiset/bag is implemented using a HashMap<T, usize> and so requires that the stored type implements Hash + Eq.

For usage examples, see the primary type HashBag.

If you want to use a hash table with amortized resizes, set the amortize feature.

Structs

Drain

An draining iterator over the distinct items of a HashBag and their occurrence counts.

HashBag

A hash bag implemented as a HashMap where the value is usize.

IntoIter

An owning iterator over the distinct items of a HashBag and their occurrence counts.

Iter

An iterator over the items of a HashBag.

SetIter

An iterator over the distinct items of a HashBag and their occurrence counts.