Trait core::cmp::EquivDeprecated [-]  [+] [src]

pub trait Equiv<T: ?Sized>: ?Sized {
    fn equiv(&self, other: &T) -> bool;
}

The equivalence relation. Two values may be equivalent even if they are of different types. The most common use case for this relation is container types; e.g. it is often desirable to be able to use &str values to look up entries in a container with String keys.

Required Methods

fn equiv(&self, other: &T) -> bool

Implement this function to decide equivalent values.

Implementors