Instruction 3

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Protocol Composition

The final feature you’ll learn in this lesson is protocol composition. Protocol composition allows you to combine multiple protocols at either the point of conformance or at the point of usage.

struct Movie: MediaItem, Codable, Sendable {
    // ...
}
func processItem(_ item: MediaItem & Codable) {
    
}
See forum comments
Download course materials from Github
Previous: Demo 2 Next: Demo 3