Trait std::cmp::EquivDeprecated
[-]
[+]
[src]
pub trait Equiv<T> { 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
Implementors
impl<T> Equiv<*mut T> for *const T
impl<T> Equiv<*const T> for *mut T
impl<T: PartialEq<T>, V: AsSlice<T>> Equiv<V> for [T]
impl<'a, T: PartialEq<T>, V: AsSlice<T>> Equiv<V> for &'a mut [T]
impl<S: Str> Equiv<S> for str
impl<'a, S: Str> Equiv<S> for MaybeOwned<'a>
impl<'a, S: Str> Equiv<S> for String
impl<T: PartialEq<T>, V: AsSlice<T>> Equiv<V> for Vec<T>