<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Distributed/DistributedTargetInvocationEncoder/recordGenericSubstitution(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Distributed"
    ],
    "preciseIdentifier" : "s:11Distributed0A23TargetInvocationEncoderP25recordGenericSubstitutionyyqd__mKlF"
  },
  "title" : "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.

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

## Parameters

`type`

a generic substitution type to be recorded for this invocation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)