Skip to content

StructMetadata

tevelee edited this page Jul 25, 2026 · 2 revisions

StructMetadata

The metadata structure that represents a struct type in Swift.

public struct StructMetadata: TypeMetadata, LayoutWrapper 

ABI Stability: Stable since the following

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

Inheritance

TypeMetadata, LayoutWrapper

Properties

ptr

Backing struct metadata pointer.

public let ptr: UnsafeRawPointer

descriptor

The struct context descriptor that describes this struct.

public var descriptor: StructDescriptor 

fieldOffsets

An array of field offsets for this struct's stored representation.

public var fieldOffsets: [Int] 

trailingFlags

Flags recorded after this generic struct metadata's field-offset vector when the compiler emitted a static specialization.

public var trailingFlags: MetadataTrailingFlags? 

isStaticallySpecializedGenericMetadata

Whether this metadata is a generic specialization created during compilation.

public var isStaticallySpecializedGenericMetadata: Bool 

isCanonicalStaticallySpecializedGenericMetadata

Whether this compiled generic specialization was made canonical by its metadata accessor.

public var isCanonicalStaticallySpecializedGenericMetadata: Bool 
Types
Protocols
Global Typealiases
Global Variables
Global Functions

Clone this wiki locally