---
title: "functionHandle(function:stage:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrenderpipelinestate/functionhandle(function:stage:)-1pgxo"
---

# functionHandle(function:stage:)

Obtains the function handle for a specific function this pipeline state links at the binary level.

## Declaration

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

## Parameters

- `function`: A binary function to retrieve the handle.
- `stage`: The shader stage that uses the function.

## Return Value

Return Value A function handle representing the function if present, otherwise nil.
