pub trait Compare {
// Required method
fn compare(&self, other: &Self) -> bool;
}Expand description
Comparison ignoring the order of array items and object entries.
Required Methods§
Sourcefn compare(&self, other: &Self) -> bool
fn compare(&self, other: &Self) -> bool
Checks whether the two values are equal, up to the order of array items and object entries.
Two arrays are equal when they have the same length and each item of
one can be paired with a distinct, compare-equal item of the other.
An object containing a duplicate key never compares equal, since such
a document is not valid JSON-LD.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".