---
title: "functionHandle(function:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/functionhandle(function:)-w9ia"
---

# functionHandle(function:)

Get the function handle for the specified binary-linked function from the pipeline state.

## Declaration

```swift
func functionHandle(function: any MTL4BinaryFunction) -> (any MTLFunctionHandle)?
```

## Parameters

- `function`: A doc://com.apple.metal/documentation/Metal/MTL4BinaryFunction instance representing the function binary.

## Return Value

Return Value A MTLFunctionHandle instance  for a binary function that was compiled with MTLFunctionOptionPipelineIndependent, otherwise nil.
