<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/IKRig/ConstraintsCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation5IKRigV21ConstraintsCollectionV"
  },
  "title" : "IKRig.ConstraintsCollection"
}
-->

# IKRig.ConstraintsCollection

Ordered dictionary-like container.

```
struct ConstraintsCollection
```

## Overview

Supports subscripting by index, element’s identifier or element’s name.

## Topics

### Initializers

[`init([IKRig.ConstraintsCollection.Element])`](/documentation/RealityKit/IKRig/ConstraintsCollection/init(_:))

Creates a collection with the provided constraints.

### Instance Properties

[`var count: Int`](/documentation/RealityKit/IKRig/ConstraintsCollection/count)

The number of elements in the collection.

[`var isEmpty: Bool`](/documentation/RealityKit/IKRig/ConstraintsCollection/isEmpty)

A Boolean value indicating whether the collection is empty.

### Instance Methods

[`func contains(IKRig.ConstraintsCollection.Element.ID) -> Bool`](/documentation/RealityKit/IKRig/ConstraintsCollection/contains(_:))

Returns a Boolean value that indicates whether the collection contains an element with
a specific identifier.

[`func set(IKRig.ConstraintsCollection.Element) -> IKRig.ConstraintsCollection.Element?`](/documentation/RealityKit/IKRig/ConstraintsCollection/set(_:))

Updates the element with identifier matching the provided value’s identifier.

### Subscripts

[`subscript(_:)`](/documentation/RealityKit/IKRig/ConstraintsCollection/subscript(_:))

Accesses the element with the specified identifier.

## Relationships

### Conforms To

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

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

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

---

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)