Trait KeyStrategy

Source
pub trait KeyStrategy {
    type Key;
    type Value;
    type Pair;

    // Required methods
    fn get_key(value: &Self::Pair) -> &Self::Key;
    fn hash(key: &Self::Key) -> u32;
}

Required Associated Types§

Source

type Key

Source

type Value

Source

type Pair

Key value pair(or Single)

Required Methods§

Source

fn get_key(value: &Self::Pair) -> &Self::Key

e.g. Gets first tuple(Value) element from tuple

Source

fn hash(key: &Self::Key) -> u32

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§

Source§

impl<K, V> KeyStrategy for BSTScatterKeyExtractor<K, V>
where K: Hash,