<!--
{
  "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/DistributedActorSystem/ActorID",
  "metadataVersion" : "0.1.0",
  "role" : "Associated Type",
  "symbol" : {
    "kind" : "Associated Type",
    "modules" : [
      "Distributed"
    ],
    "preciseIdentifier" : "s:11Distributed0A11ActorSystemP0B2IDQa"
  },
  "title" : "ActorID"
}
-->

# ActorID

The type ID that will be assigned to any distributed actor managed by this actor system.

```
associatedtype ActorID : Hashable, Sendable
```

## Discussion

### A note on Codable IDs

If this type is `Codable`, then any `distributed actor` using this `ActorID` as its [`id`](/documentation/Distributed/DistributedActor/id)
will gain a synthesized `Codable` conformance which is implemented by encoding the `ID`.
The decoding counter part of the `Codable` conformance is implemented by decoding the `ID` and passing it to
the [`resolve(id:using:)`](/documentation/Distributed/DistributedActor/resolve(id:using:)) method.

---

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)