Skip to main content

EquivalentTo

Trait EquivalentTo 

Source
pub trait EquivalentTo<O = Self>: Sized {
    // Required method
    fn is_equiv<E>(&self, other: &O) -> bool
       where E: EqvRelation<Self, O>;
}
Expand description

Trait that enables checking for equivalence as a method.

This trait is implemented for all types but the is_equiv method requires the equivalency relation that should be applied.

Required Methods§

Source

fn is_equiv<E>(&self, other: &O) -> bool
where E: EqvRelation<Self, O>,

Returns true if self is equivalent to other.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, O> EquivalentTo<O> for T