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
162 downloads per month
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
num-traits
: provides a commonality implemented in terms ofnum_traits::Zero
.
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