PartialEq
This trait allows for partial equality, for types that do not have a full equivalence relation. For example, in floating point numbers
NaN != NaN
,so floating point types implementPartialEq
but not [trait@Eq
].Formally speaking, whenRhs == Self
, this trait corresponds to a partial equivalence relation.