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§
Sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares self
to key
and returns true
if they are equal.