protocol DefaultEquatable<Self> { ... }

Mixin to provide a default implementation of Equatable for a type.

This mixin provides a default implementation of equals for a type. If the type is a struct, it will compare each field as with the == operator. If the type is an enum, it will compare the underlying value using the == operator.

If any field is not equatable, this will result in a compilation error.

Example

Provided methods