#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

#1049 in Data structures

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