Skip to main content

KeyEquivalence

Trait KeyEquivalence 

Source
pub trait KeyEquivalence<K> {
    // Required method
    fn equivalent(&self, left: &K, right: &K) -> bool;
}
Expand description

Policy used to decide whether two table or set keys are equivalent.

Required Methods§

Source

fn equivalent(&self, left: &K, right: &K) -> bool

Return whether left and right identify the same logical key.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<K, F> KeyEquivalence<K> for F
where F: Fn(&K, &K) -> bool,