Skip to content

FieldRecord

Azoy edited this page May 6, 2021 · 2 revisions

FieldRecord

A record that describes a single stored property or an enum case.

public struct FieldRecord: 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 flags that describe this field record.

public var flags: Flags 

hasMangledTypeName

Whether or not this record has a mangled type name that describes the fields type.

public var hasMangledTypeName: Bool 

mangledTypeName

The mangled type name that demangles to the field's type.

public var mangledTypeName: UnsafeRawPointer 

Note: Use this in combination with metadata's type(of:) method to get a field's type.

Example: let metadata = reflect(SomeType.self) as! TypeMetadata for field in metadata.contextDescriptor.fields.records { let fieldType = metadata.type(of: field.mangledTypeName) }

name

The name of the field.

public var name: String 

referenceStorage

The reference storage modifer on this field, if any.

public var referenceStorage: ReferenceStorageKind 
Types
Protocols
Global Variables
Global Functions
Clone this wiki locally