-
Notifications
You must be signed in to change notification settings - Fork 0
StructDescriptor
A struct descriptor that describes some structure context.
public struct StructDescriptor: TypeContextDescriptor, LayoutWrapper ABI Stability: Stable since the following
| macOS | iOS/tvOS | watchOS | Linux | Windows |
|-------|----------|---------|-------|---------|
| 10.14 | 12.2 | 5.2 | NA | NA |
TypeContextDescriptor, LayoutWrapper
Backing context descriptor pointer.
public let ptr: UnsafeRawPointerThe number of stored properties this struct defines.
public var numFields: Int The number of words from the metadata pointer to the vector of field offsets for this struct. E.g. If this is 2: let fieldOffsetVector = metadataPtr + MemoryLayout.size * 2 // fieldOffsetVector is a buffer pointer to Int32's that tell the // stored offset for a specific field at index i.
public var fieldOffsetVectorOffset: Int The typed generic value-metadata pattern for this struct, if it is generic.
public var genericValueMetadataPattern: GenericValueMetadataPattern? The foreign metadata initialization info for this struct metadata, if it has any.
public var foreignMetadataInitialization: ForeignMetadataInitialization? The singleton metadata initialization info for this struct metadata, if it has any.
public var singletonMetadataInitialization: SingletonMetadataInitialization? Canonical metadata specializations emitted for this generic type.
public var canonicalMetadataPrespecializations: [Metadata] The runtime-owned once-token used to cache this generic type's canonical metadata prespecializations. This storage is exposed for inspection only and must not be mutated.
public var canonicalMetadataPrespecializationCachingOnceToken: UnsafeRawPointer? Capabilities this type's primary definition explicitly inverts.
public var invertedProtocols: InvertibleProtocolSet? The directly stored singleton metadata, when the compiler emitted one.
public var singletonMetadata: Metadata? Generated at 2026-07-27T11:49:06+0000 using swift-doc 1.0.0-rc.1.
Types
- AccessibleFunction
- AccessibleFunctionFlags
- AnonymousDescriptor
- AnonymousDescriptor.Flags
- AnyExistentialContainer
- AsyncContinuationFlags
- BoxPair
- ClassDescriptor
- ClassMetadata
- ClassMetadata.Flags
- ConformanceDescriptor
- ConformanceDescriptor.Flags
- ContextDescriptorFlags
- ContextDescriptorKind
- ContinuationStatus
- CoroutineAllocator
- CoroutineAllocatorFlags
- CoroutineAllocatorKind
- DefaultOverrideTableHeader
- DualExistentialContainer
- DynamicCastFlags
- DynamicReplacementChainEntry
- DynamicReplacementDescriptor
- DynamicReplacementKey
- DynamicReplacementScope
- EnumDescriptor
- EnumMetadata
- EnumValueWitnessTable
- ExistentialContainer
- ExistentialMetadata
- ExistentialMetadata.Flags
- ExistentialProtocolReference
- ExistentialProtocolReference.Kind
- ExtendedExistentialMetadata
- ExtendedExistentialTypeShape
- ExtendedExistentialTypeShape.Flags
- ExtendedExistentialTypeShape.SpecialKind
- ExtendedFunctionTypeFlags
- ExtensionDescriptor
- ExtraClassDescriptorFlags
- FieldDescriptor
- FieldDescriptor.Kind
- FieldRecord
- FieldRecord.Flags
- FixedArrayMetadata
- ForeignClassMetadata
- ForeignMetadataInitialization
- ForeignReferenceTypeMetadata
- FunctionConvention
- FunctionMetadata
- FunctionMetadata.DifferentiabilityKind
- FunctionMetadata.Flags
- FunctionMetadata.ParamFlags
- GenericArgument
- GenericClassMetadataPattern
- GenericContext
- GenericContextDescriptorFlags
- GenericEnvironment
- GenericEnvironmentFlags
- GenericMetadataPartialPattern
- GenericMetadataPattern
- GenericMetadataPattern.Flags
- GenericPackKind
- GenericPackShapeDescriptor
- GenericPackShapeHeader
- GenericParameterDescriptor
- GenericParameterKind
- GenericRequirementDescriptor
- GenericRequirementDescriptor.Flags
- GenericRequirementKind
- GenericRequirementLayoutKind
- GenericSignatureHeader
- GenericValueDescriptor
- GenericValueHeader
- GenericValueMetadataPattern
- GenericValueType
- GenericWitnessTable
- GlobalActorReference
- HeapGenericLocalVariableMetadata
- HeapLocalVariableMetadata
- HeapObject
- InvertibleProtocolKind
- InvertibleProtocolSet
- JobFlags
- JobKind
- JobPriority
- KeyPathComponentHeader
- KeyPathComponentHeader.ComputedIdentifierKind
- KeyPathComponentHeader.ComputedIdentifierResolution
- KeyPathComponentHeader.ComputedPropertyKind
- KeyPathComponentHeader.Kind
- KeyPathComponentHeader.OptionalOperation
- KeyPathComponentHeader.StoredOffsetKind
- KnownMetadata
- KnownMetadata.Builtin
- MetadataAccessFunction
- MetadataBounds
- MetadataInitializationKind
- MetadataKind
- MetadataPack
- MetadataRequest
- MetadataResponse
- MetadataState
- MetadataTrailingFlags
- MetatypeMetadata
- MethodDefaultOverrideDescriptor
- MethodDescriptor
- MethodDescriptor.Flags
- MethodDescriptor.Kind
- MethodOverrideDescriptor
- ModuleDescriptor
- NonUniqueExtendedExistentialTypeShape
- ObjCClassWrapperMetadata
- OpaqueDescriptor
- OpaqueMetadata
- OpaqueTypeReplacement
- OverrideTableHeader
- PackLifetime
- ProtocolDescriptor
- ProtocolDescriptor.Flags
- ProtocolDispatchStrategy
- ProtocolRequirement
- ProtocolRequirement.Flags
- ProtocolRequirement.Kind
- ReferenceStorageKind
- RelativeWitnessTable
- ResilientClassMetadataPattern
- ResilientWitness
- SerialExecutorReference
- SerialExecutorReference.Kind
- SingletonMetadataInitialization
- SpecialProtocol
- StructDescriptor
- StructMetadata
- TaskCreateFlags
- TaskExecutorReference
- TaskExecutorReference.Kind
- TaskGroupFlags
- TaskOptionRecordFlags
- TaskOptionRecordKind
- TaskStatusRecordFlags
- TaskStatusRecordKind
- TupleMetadata
- TupleMetadata.Element
- TypeContextDescriptorFlags
- TypeGenericContext
- TypeImportInfo
- TypeReferenceKind
- UnknownMetadata
- VTableDescriptorHeader
- ValueOwnership
- ValueWitnessTable
- ValueWitnessTable.Flags
- WitnessTable
- WitnessTablePack
Global Typealiases
Global Variables
Global Functions
- container(for:)
- findConformance(to:)
- findConformance(toProtocolNamed:)
- lookupSection(_:segment:section:do:)
- reflect(_:)
- reflectClass(_:)
- reflectEnum(_:)
- reflectStruct(_:)
- registerAccessibleFunctions(section:size:)
- registerDynamicReplacementScopes(section:size:)
- registerOpaqueTypeReplacements(section:size:)
- registerProtocolConformances(section:size:)
- registerProtocols(section:size:)
- registerTypeMetadata(section:size:)
- swift_allocBox(for:)
- swift_allocObject(for:size:alignment:)
- swift_conformsToProtocol(metadata:protocol:)
- swift_conformsToProtocol(type:protocol:)
- swift_getTypeName(for:qualified:)
- withProjectedValue(of:_:)
- withProjectedValues(of:_:)