<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreHID",
  "identifier" : "/documentation/CoreHID/HIDElementCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core HID"
    ],
    "preciseIdentifier" : "s:7CoreHID20HIDElementCollectionV"
  },
  "title" : "HIDElementCollection"
}
-->

# HIDElementCollection

A collection of items from a report descriptor for a HID device.

```
struct HIDElementCollection
```

## Overview

Collections are a defined part of the HID specification to specify how groupings of data relate to each other, and provide an overall structure for the organization of device functionality.

See the HID specification for more details: [](https://www.usb.org/hid).

## Topics

### Instance Properties

[`var childCollections: [HIDElementCollection]`](/documentation/CoreHID/HIDElementCollection/childCollections)

The collections contained by this collection, if there are any.

[`var childElements: [HIDElement]`](/documentation/CoreHID/HIDElementCollection/childElements)

The elements contained by this collection, if there are any.

[`var client: HIDDeviceClient`](/documentation/CoreHID/HIDElementCollection/client)

The client for the device with which this collection is associated.

[`var parentCollection: HIDElementCollection?`](/documentation/CoreHID/HIDElementCollection/parentCollection)

The collection that contains this collection, if there is one.

[`var type: HIDElementCollection.CollectionType`](/documentation/CoreHID/HIDElementCollection/type)

The type of this collection.

[`var usage: HIDUsage`](/documentation/CoreHID/HIDElementCollection/usage)

The HID specification compliant usage for this collection.

### Enumerations

[`enum CollectionType`](/documentation/CoreHID/HIDElementCollection/CollectionType)

Types of [`HIDElementCollection`](/documentation/CoreHID/HIDElementCollection)s.

## Relationships

### Conforms To

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

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

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

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

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

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

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

---

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)