Trait total_maps::Commonality

source ·
pub trait Commonality<V> {
    // Required methods
    fn common() -> V;
    fn is_common(value: &V) -> bool;
}
Expand description

Defines a notion of “common” vs. “uncommon” values for the type V, used to determine which entries are stored in a TotalHashMap or TotalBTreeMap.

There could be multiple definitions of commonality for the same type:

Required Methods§

source

fn common() -> V

The common value of type V.

source

fn is_common(value: &V) -> bool

Returns true if value is the common value of type V. Self::is_common(Self::common()) must be true.

Object Safety§

This trait is not object safe.

Implementors§