Structureswift 6.0.1Swift
ObjectIdentifier
A unique identifier for a class instance or metatype.
@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.
Citizens in Swift
Conformances
protocol BitwiseCopyable
protocol Comparable
A type that can be compared using the relational operators
<
,<=
,>=
, and>
.protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Sendable
Type members
init(AnyObject
) Creates an instance that uniquely identifies the given class instance.
init(any Any.Type
) Creates an instance that uniquely identifies the given metatype.
static func < (lhs: ObjectIdentifier, rhs: ObjectIdentifier
) -> Bool static func == (x: ObjectIdentifier, y: ObjectIdentifier
) -> Bool
Instance members
var debugDescription: String
A textual representation of the identifier, suitable for debugging.
func hash(into: inout Hasher
) Hashes the essential components of this value by feeding them into the given hasher.
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.
static func ... (minimum: Self
) -> PartialRangeFrom<Self> Returns a partial range extending upward from a lower bound.
static func ... (maximum: Self
) -> PartialRangeThrough<Self> Returns a partial range up to, and including, its upper bound.
static func ... (minimum: Self, maximum: Self
) -> ClosedRange<Self> Returns a closed range that contains both of its bounds.
static func ..< (maximum: Self
) -> PartialRangeUpTo<Self> Returns a partial range up to, but not including, its upper bound.
static func ..< (minimum: Self, maximum: Self
) -> Range<Self> Returns a half-open range that contains its lower bound but not its upper bound.
static func <= (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.
static func > (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func >= (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.
Available in Synchronization
Conformances
protocol AtomicOptionalRepresentable
An atomic value that also supports atomic operations when wrapped in an
Optional
. Atomic optional representable types come with a standalone atomic representation for their optional-wrapped variants.protocol AtomicRepresentable
A type that supports atomic operations through a separate atomic storage representation.
Typealiases
Type members
static func decodeAtomicOptionalRepresentation(consuming ObjectIdentifier.AtomicOptionalRepresentation
) -> ObjectIdentifier? static func decodeAtomicRepresentation(consuming ObjectIdentifier.AtomicRepresentation
) -> ObjectIdentifier static func encodeAtomicOptionalRepresentation(consuming ObjectIdentifier?
) -> ObjectIdentifier.AtomicOptionalRepresentation static func encodeAtomicRepresentation(consuming ObjectIdentifier
) -> ObjectIdentifier.AtomicRepresentation