Trait scc::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,