Identifiable
Swift
A class of types whose instances hold the value of an entity with stable identity.
인스턴스가 stable 한 신원(identity)을 갖는 걸 보장하게 하는 프로토콜
class User: Identifiable {
var id: UUID = UUID() // id 의 타입이 Hashable 만 만족하면 된다.
}
참고 자료
- https://developer.apple.com/documentation/swift/identifiable