Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§