---
title: "functionHandle(withName:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlcomputepipelinestate/functionhandle(withname:)"
---

# functionHandle(withName:)

Gets the function handle for a function this pipeline links at the Metal IR level by name.

## Declaration

```swift
func functionHandle(withName name: String) -> (any MTLFunctionHandle)?
```

## Parameters

- `name`: A string representing the name of the function.

## Return Value

Return Value A function handle corresponding to the function if the name matches a function in this pipeline state, otherwise nil.
