Protocols & Errors
A contract for capabilities
A protocol is a list of requirements β "any type that conforms to me must provide these properties and methods." It says nothing about how. It's a contract, not an implementation.
A type conforms by listing the protocol after its name (the same spot an enum puts its raw-value type) and supplying whatever the contract demands. Identifiable demands exactly one thing: a property called id. Walker has one β so Walker conforms, and anything built to work with "identifiable things" (like SwiftUI's lists) now works with walkers.
You've been looking at three protocols since Lesson 2: Identifiable (has an id), Hashable (can be compared and used in sets and navigation), and Codable (can convert to and from JSON). For simple structs, Swift generates the Hashable and Codable code automatically β the Codable deep dive is the whole next module.