---
title: MTLDeviceError.Code
framework: Metal
role: symbol
role_heading: Enumeration
platforms: [iOS 26.4+, iPadOS 26.4+, Mac Catalyst 26.4+, macOS 26.4+, tvOS 26.4+, visionOS 26.4+]
path: metal/mtldeviceerror-swift.struct/code
---

# MTLDeviceError.Code

Enumeration of kinds of errors that methods on MTLDevice can produce.

## Declaration

```swift
enum Code
```

## Topics

### Enumeration Cases

- [MTLDeviceError.Code.none](metal/mtldeviceerror-swift.struct/code/none.md)
- [MTLDeviceError.Code.notSupported](metal/mtldeviceerror-swift.struct/code/notsupported.md)

### Initializers

- [init(rawValue:)](metal/mtldeviceerror-swift.struct/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
