Skip to content

RelativeWitnessTable

tevelee edited this page Jul 25, 2026 · 1 revision

RelativeWitnessTable

A protocol witness table whose entries use relative pointers.

public struct RelativeWitnessTable: LayoutWrapper 

Some Swift runtime builds use this representation to reduce relocation overhead. Its requirement entries remain protocol-specific and opaque, but the leading conformance descriptor is always inspectable.

Do not pass a RelativeWitnessTable to APIs expecting WitnessTable: their entries have different physical representations.

Inheritance

Equatable, LayoutWrapper

Initializers

init(ptr:)

Initializes a relative witness table from a raw pointer.

public init(ptr: UnsafeRawPointer) 

Parameters

  • ptr: A pointer to the table's memory layout.

Properties

ptr

The raw pointer to the relative witness table in memory.

public let ptr: UnsafeRawPointer

conformanceDescriptor

The conformance descriptor that describes this protocol conformance.

public var conformanceDescriptor: ConformanceDescriptor 

Operators

==

public static func == (lhs: RelativeWitnessTable, rhs: RelativeWitnessTable) -> Bool 
Types
Protocols
Global Typealiases
Global Variables
Global Functions

Clone this wiki locally