Skip to content

ConformanceDescriptor

tevelee edited this page Jul 25, 2026 · 2 revisions

ConformanceDescriptor

A structure that helps describe a particular conformance in Swift. Information includes what type is being conformed to what protocol, some flags like if the conformance is retroactive, has conditional requirements, etc.

public struct ConformanceDescriptor: LayoutWrapper 

ABI Stability: Stable since the following

| macOS | iOS/tvOS | watchOS | Linux | Windows |
|-------|----------|---------|-------|---------|
| 10.14 | 12.2     | 5.2     | NA    | NA      |

Inheritance

LayoutWrapper

Properties

flags

The specific flags that describe this conformance descriptor.

public var flags: Flags 

`protocol`

The protocol that this type conforms to.

public var `protocol`: ProtocolDescriptor 

contextDescriptor

The context descriptor of the type being conformed.

public var contextDescriptor: TypeContextDescriptor? 

objcClass

canImport(ObjectiveC)
public var objcClass: ObjCClassWrapperMetadata? 

witnessTablePattern

The witness table pattern is a base witness table that this conformance can base actual witness tables off of. In the case that this conformance does not have a generic witness table (flags.hasGenericWitnessTable), this witness table pattern is actually the real witness table.

public var witnessTablePattern: WitnessTable 

retroactiveContext

The context that owns a retroactive conformance, if recorded.

public var retroactiveContext: ContextDescriptor? 

conditionalRequirements

Generic requirements that must hold for this conformance to apply.

public var conditionalRequirements: [GenericRequirementDescriptor] 

conditionalPackShapeDescriptors

Pack-shape descriptors used by conditional generic requirements.

public var conditionalPackShapeDescriptors: [GenericPackShapeDescriptor] 

resilientWitnesses

Witnesses recorded in a resilient conformance pattern.

public var resilientWitnesses: [ResilientWitness] 

genericWitnessTable

Instantiation metadata for a generic or resilient witness table.

public var genericWitnessTable: GenericWitnessTable? 

globalActorReference

Global-actor isolation metadata for this conformance.

public var globalActorReference: GlobalActorReference? 
Types
Protocols
Global Typealiases
Global Variables
Global Functions

Clone this wiki locally