#value #key #map #associated #maps #default-value #btree-map

total-maps

Maps where every possible key has an associated value

3 unstable releases

0.2.1 Oct 4, 2024
0.2.0 Sep 2, 2024
0.1.0 Apr 21, 2024

#1116 in Data structures

Download history 80/week @ 2024-08-27 54/week @ 2024-09-03 9/week @ 2024-09-10 9/week @ 2024-09-17 11/week @ 2024-09-24 166/week @ 2024-10-01 15/week @ 2024-10-08 1/week @ 2024-10-15

162 downloads per month

MIT license

50KB
1K SLoC

total-maps

Maps where every possible key has an associated value.

Only entries with uncommon values are actually stored in the map; all other keys are presumed to be associated with a common value. The definition of "common" and "uncommon" can be customized via the Commonality trait.

Cargo features


lib.rs:

Maps where every possible key has an associated value.

Only entries with uncommon values are actually stored in the map; all other keys are presumed to be associated with a common value. The definition of "common" and "uncommon" is determined by the map's optional [Commonality] type parameter; if unspecified, the map will use [DefaultCommonality], which uses the standard [Default] trait to provide the common value.

[TotalHashMap] and [TotalBTreeMap] are the main data structures provided by this crate.

Dependencies

~200KB