<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IdentityDocumentServices",
  "identifier" : "/documentation/IdentityDocumentServices/IdentityDocumentPresentmentError/Code-swift.enum/~=(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Operator",
  "symbol" : {
    "kind" : "Operator",
    "modules" : [
      "IdentityDocumentServices"
    ],
    "preciseIdentifier" : "s:24IdentityDocumentServices0aB16PresentmentErrorV4CodeO2teoiySbAE_s0E0_ptFZ"
  },
  "title" : "~=(_:_:)"
}
-->

# ~=(_:_:)

A pattern-matching operator for matching error codes directly.
This operator enables traditional switch/case pattern matching on error codes.

```
static func ~= (lhs: IdentityDocumentPresentmentError.Code, rhs: any Error) -> Bool
```

---

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)