<!--
{
  "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/DistributedTargetInvocationDecoder/decodeGenericSubstitutions()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Distributed"
    ],
    "preciseIdentifier" : "s:11Distributed0A23TargetInvocationDecoderP26decodeGenericSubstitutionsSayypXpGyKF"
  },
  "title" : "decodeGenericSubstitutions()"
}
-->

# decodeGenericSubstitutions()

Decode all generic substitutions that were recorded for this invocation.

```
mutating func decodeGenericSubstitutions() throws -> [any Any.Type]
```

## Return Value

array of all generic substitutions necessary to execute this invocation target.

## Discussion

The values retrieved from here must be in the same order as they were recorded by
[`recordGenericSubstitution(_:)`](/documentation/Distributed/DistributedTargetInvocationEncoder/recordGenericSubstitution(_:)).

> Throws: if decoding substitutions fails.

---

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)