Concept Flow - Protocol conformance via extension
Define Protocol
Define Type (struct/class)
Extend Type
Add Protocol Conformance in Extension
Use Type as Protocol
Call Protocol Methods
Execution of Protocol Methods
First, we define a protocol and a type. Then, we extend the type to add protocol conformance. Finally, we use the type as the protocol and call its methods.