Skip to content

FunctionMetadata

tevelee edited this page Jul 25, 2026 · 3 revisions

FunctionMetadata

The metadata structure that represents a function type in Swift.

public struct FunctionMetadata: Metadata, LayoutWrapper 

ABI Stability: Unstable across all platforms

| macOS | iOS/tvOS | watchOS | Linux | Windows |
|-------|----------|---------|-------|---------|
| NA    | NA       | NA      | NA    | NA      |

Inheritance

Metadata, LayoutWrapper

Properties

ptr

Backing function metadata pointer.

public let ptr: UnsafeRawPointer

flags

The flags specific to function metadata.

public var flags: Flags 

resultType

The result type for this function.

public var resultType: Any.Type 

resultMetadata

The result type metadata for this function.

public var resultMetadata: Metadata 

paramTypes

An array of parameter types for this function.

public var paramTypes: [Any.Type] 

paramMetadata

An array of parameter type metadata for this function.

public var paramMetadata: [Metadata] 

paramFlags

An array of parameter flags that describe each parameter for this function, if any.

public var paramFlags: [ParamFlags] 

globalActorType

The global actor to which this function type is isolated, if any.

public var globalActorType: Any.Type? 

extendedFlags

The extended function-type flags, if the metadata carries them.

public var extendedFlags: ExtendedFunctionTypeFlags? 

thrownErrorType

The error type of a typed-throws function, if any.

public var thrownErrorType: Any.Type? 
Types
Protocols
Global Typealiases
Global Variables
Global Functions

Clone this wiki locally