==
and !=
operators for
those types.
This trait can be used with #[derive]
. When derive
d on structs, two
instances are equal if all fields are equal, and not equal if any fields
are not equal. When derive
d on enums, two instances are equal if they
are the same variant and all fields are equal.
lhs
and rhs
equal, and is used by ==
.
lhs
and rhs
are not equal, and is used by !=
.