#multiset #hash-map #bag

hashbag

An unordered multiset implementation using a hash bag

14 releases

0.1.13 Nov 15, 2025
0.1.12 Feb 17, 2024
0.1.11 Mar 5, 2023
0.1.9 Jul 2, 2022
0.1.2 Feb 7, 2020

#81 in Data structures

Download history 7876/week @ 2026-01-13 8624/week @ 2026-01-20 10234/week @ 2026-01-27 14094/week @ 2026-02-03 17695/week @ 2026-02-10 31563/week @ 2026-02-17 33178/week @ 2026-02-24 34753/week @ 2026-03-03 32171/week @ 2026-03-10 33224/week @ 2026-03-17 33097/week @ 2026-03-24 32464/week @ 2026-03-31 32868/week @ 2026-04-07 42917/week @ 2026-04-14 35966/week @ 2026-04-21 45796/week @ 2026-04-28

161,119 downloads per month
Used in 256 crates (10 directly)

MIT/Apache

66KB
1K SLoC

Crates.io Documentation codecov Dependency status

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).

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–320KB