Skip to content

Glossary: Swift Beyond the Basics

constraint

Also written: constraints, where clause

A rule on a type parameter, such as `T: Comparable`. A `where` clause can add constraints to functions, extensions and conformances.

Where the book teaches it

Related terms

type parametergeneric functionconditional conformance