Skip to main content

DynEq

Trait DynEq 

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

A dynamic equality trait for types implementing PartialEq or Eq.

Developers should implement PartialEq or Eq for dyn Trait types and delegate to this trait for dynamic equality checks.

Required Methods§

Source

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

Compares self with another Any type for equality.

Implementors§

Source§

impl<T> DynEq for T
where T: PartialEq + 'static,