Constraint

protocol Constraint : Sendable

A constraint used to perform type checking or inference.

A constraint is a predicate over one or multiple types, including type variables, that must be satisfied in order for a program to be well-typed. Constraints also server to infer implicit type information from the structure of the program.

Available where Self: Equatable

  • equals(_:) Extension method

    Returns whether self is equal to other.

    Declaration

    Swift

    func equals<Other>(_ other: Other) -> Bool where Other : Constraint