Skip to main content

DynEq

Trait DynEq 

Source
pub trait DynEq: Any {
    // Required method
    fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool;
}
Expand description

An object safe version of Eq. This trait is automatically implemented for any 'static type that implements Eq.

Required Methods§

Source

fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool

This method tests for self and other values to be equal.

Implementers should avoid returning true when the underlying types are not the same.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> DynEq for T
where T: Any + Eq,