---
title: MTLStructType
framework: metal
role: symbol
role_heading: Class
path: metal/mtlstructtype
---

# MTLStructType

A description of a structure.

## Declaration

```swift
class MTLStructType
```

## Overview

Overview MTLStructType is part of the reflection API that allows Metal framework code to query details of a struct that is passed as an argument of a Metal shading language function. Don’t create MTLStructType instances directly; instead query the bufferStructType property of an MTLArgument instance, or call the structType() method for an MTLStructMember instance. To examine the details of the struct, you can recursively drill down the members property of the MTLStructType instance, which contains details about struct members, each of which is represented by an MTLStructMember instance.

## Topics

### Obtaining information about struct members

- [members](metal/mtlstructtype/members.md)
- [memberByName(_:)](metal/mtlstructtype/memberbyname(_:).md)

## Relationships

### Inherits From

- [MTLType](metal/mtltype.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Shader types

- [MTLType](metal/mtltype.md)
- [MTLDataType](metal/mtldatatype.md)
- [MTLArrayType](metal/mtlarraytype.md)
- [MTLStructMember](metal/mtlstructmember.md)
- [MTLPointerType](metal/mtlpointertype.md)
- [MTLTextureReferenceType](metal/mtltexturereferencetype.md)
