<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntentsTesting",
  "identifier" : "/documentation/AppIntentsTesting/IntentDefinitions/DefinitionCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents Testing"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting17IntentDefinitionsV20DefinitionCollectionV"
  },
  "title" : "IntentDefinitions.DefinitionCollection"
}
-->

# IntentDefinitions.DefinitionCollection

A collection of a specific type of definition.

```
struct DefinitionCollection<Definition>
```

## Overview

Retrieve individual definitions using their type identifier string as shown in the following example:

```swift
let orderIntent = definitions.intents[
    "OrderCoffeeIntent"
]
```

## Topics

### Subscripts

[`subscript(String) -> Definition`](/documentation/AppIntentsTesting/IntentDefinitions/DefinitionCollection/subscript(_:))

Retrieves a type definition using its identifier.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)