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:
- The basic implementation, DefaultCommonality, is based on the Default trait.
- EmptyCommonality is specialized for collection types.
- ZeroCommonality is based on the num_traits::Zero trait.
Required Methods§
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.