IdentityResource
internal protocol IdentityResource : Decodable, Encodable, Identifiable
A type that holds the value of an entity with stable identity.
Use the IdentityResource
protocol to provide a stable notion of identity to a class or value type. For example, you could define a User type with an id property that is stable across your app and your app’s database storage. You could use the id property to identify a particular user even if other data fields change, such as the user’s name.
-
The id of the resource.
Declaration
Swift
var id: String { get }
-
The type of the resource.
Declaration
Swift
var type: String { get }
-
The relative link to where the resource is located.
Declaration
Swift
var href: String { get }