Skip to content

TypeContextDescriptor

Azoy edited this page May 6, 2021 · 2 revisions

TypeContextDescriptor

A type context descriptor is a context descriptor who defines some new type. This includes structs, classes, and enums. Protocols also define a new type, but aren't considered type context descriptors.

public protocol TypeContextDescriptor: ContextDescriptor 

ABI Stability: Stable since the following

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

Inheritance

ContextDescriptor

Default Implementations

typeFlags

The flags that describe this type context descriptor.

public var typeFlags: TypeContextDescriptorFlags 

name

The name of this type.

public var name: String 

accessor

The metadata access function.

public var accessor: MetadataAccessFunction 

isReflectable

Whether or not this type has a field descriptor.

public var isReflectable: Bool 

fields

The field descriptor that describes the stored representation of this type.

public var fields: FieldDescriptor 

typeGenericContext

The generic context that is unique to type context descriptors.

public var typeGenericContext: TypeGenericContext 

Requirements

typeFlags

The flags that describe this type context descriptor.

var typeFlags: TypeContextDescriptorFlags 

name

The name of this type.

var name: String 

accessor

The metadata access function.

var accessor: MetadataAccessFunction 

fields

The field descriptor that describes the stored representation of this type.

var fields: FieldDescriptor 

foreignMetadataInitialization

If this type has foreign metadata initialization, return it.

var foreignMetadataInitialization: ForeignMetadataInitialization? 

singletonMetadataInitialization

If this type has singleton metadata initialization, return it.

var singletonMetadataInitialization: SingletonMetadataInitialization? 
Types
Protocols
Global Variables
Global Functions
Clone this wiki locally