scc

Trait Equivalent

Source
pub trait Equivalent<K: ?Sized> {
    // Required method
    fn equivalent(&self, key: &K) -> bool;
}
Expand description

Key equivalence trait.

Hash will have to be implemented to make sure that the same hash value is generated for equivalent keys.

Required Methods§

Source

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

Compares self to key and returns true if they are equal.

Implementors§

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,