---
title: "recordGenericSubstitution(_:)"
framework: distributed
role: symbol
role_heading: Instance Method
path: "distributed/distributedtargetinvocationencoder/recordgenericsubstitution(_:)"
---

# recordGenericSubstitution(_:)

The arguments must be encoded order-preserving, and once decodeGenericSubstitutions is called, the substitutions must be returned in the same order in which they were recorded.

## Declaration

```swift
mutating func recordGenericSubstitution<T>(_ type: T.Type) throws
```

## Parameters

- `type`: A generic substitution type to be recorded for this invocation.
