#multiset #bag #set

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

#89 in Data structures

Download history 428669/week @ 2026-07-31 461495/week @ 2026-08-07 441275/week @ 2026-08-14 473762/week @ 2026-08-21 519663/week @ 2026-08-28 538234/week @ 2026-09-04 601812/week @ 2026-09-11 762478/week @ 2026-09-18 800128/week @ 2026-09-25 765285/week @ 2026-10-02 679297/week @ 2026-10-09 724230/week @ 2026-10-16 783664/week @ 2026-10-23 774725/week @ 2026-10-30 822078/week @ 2026-11-06 747317/week @ 2026-11-13

3,257,037 downloads per month
Used in 513 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–365KB