Skip to content

ExistentialProtocolReference

tevelee edited this page Jul 25, 2026 · 1 revision

ExistentialProtocolReference

A protocol constraint recorded in simple existential metadata.

public struct ExistentialProtocolReference: Equatable, Sendable 

Swift uses the low bit of the stored pointer to distinguish a native Swift protocol descriptor from an Objective-C protocol object. The Objective-C object is exposed as an address because its full layout belongs to the Objective-C runtime.

Inheritance

Equatable, Sendable

Initializers

init(rawValue:)

Creates a reference from its ABI representation.

public init(rawValue: UInt) 

Properties

rawValue

The pointer and discriminator bit as stored by the Swift runtime.

public let rawValue: UInt

kind

The runtime kind of the referenced protocol.

public var kind: Kind 

swiftProtocol

The native Swift protocol descriptor, when this is a Swift protocol.

public var swiftProtocol: ProtocolDescriptor? 

objcProtocolAddress

The Objective-C protocol object's address, when this is an Objective-C protocol. The address is owned and managed by the Objective-C runtime.

public var objcProtocolAddress: UnsafeRawPointer? 

name

The protocol's runtime name.

public var name: String? 

dispatchStrategy

The dispatch strategy used by this protocol.

public var dispatchStrategy: ProtocolDispatchStrategy 

needsWitnessTable

Whether method calls through this protocol require a Swift witness table.

public var needsWitnessTable: Bool 

hasClassConstraint

Whether this protocol is class-constrained.

public var hasClassConstraint: Bool 

specialProtocol

The special runtime-known protocol kind, if this is a Swift protocol.

public var specialProtocol: SpecialProtocol? 
Types
Protocols
Global Typealiases
Global Variables
Global Functions

Clone this wiki locally