Crate total_maps

source ·
Expand description

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.

Re-exports§

Modules§

  • Provides TotalBTreeMap, an ordered map in which 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.
  • Provides EmptyCommonality, a commonality for collection types where the common value is an empty collection.
  • Provides TotalHashMap, a hash map in which 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.
  • Maps that only store entries with nonzero values.

Structs§

Traits§