A refresher on protocols

You define protocols with the protocol keyword:

protocol BasicProtocol {}

The same way classes can inherit from each other, a protocol can inherit from another as well. The syntax is the same as the one for classes:

protocol ComplexProtocol: BasicProtocol {}

Classes and structures can adopt protocols and a single type can conform to multiple protocols, as in the example:

class MyClass: MySuperClass, BasicProtocol, AnotherProtocol {}

struct MyStruct: AnotherProtocol {}