Skip to main content

deep_equals

Function deep_equals 

Source
pub fn deep_equals(a: &Value, b: &Value) -> bool
Expand description

Deep structural equality with strict int/float type distinction (PROTOCOL §4.1).

  • Int(1) is NOT equal to Float(1.0).
  • NaN == NaN is treated as equal (used only for Failure-path fixtures).
  • strings compare by content (code points), arrays are ordered, objects are key-set + value equal (order-independent).