ObjectIdentifier

A unique identifier for a class instance or metatype.

You’re reading documentation from an older version of Swift 6.1.

A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.

@frozen struct ObjectIdentifier

This unique identifier is only valid for comparisons during the lifetime of the instance.

In Swift, only class instances and metatypes have unique identities. There is no notion of identity for structs, enums, functions, or tuples.