== and != operators for
those types.
This trait can be used with #[derive]. When derived on structs, two
instances are equal if all fields are equal, and not equal if any fields
are not equal. When derived on enums, two instances are equal if they
are the same variant and all fields are equal.
Signature
Examples
An example in which two points are equal if their x and y coordinates are equal.Trait functions
eq
Returns whetherlhs and rhs equal, and is used by ==.
Signature
Examples
ne
Returns whetherlhs and rhs are not equal, and is used by !=.