---
title: elementStructType()
framework: metal
role: symbol
role_heading: Instance Method
path: metal/mtlarraytype/elementstructtype()
---

# elementStructType()

Provides a description of the underlying struct type when an array holds structs as its elements.

## Declaration

```swift
func elementStructType() -> MTLStructType?
```

## Return Value

Return Value An object that describes the struct. If the array elements aren’t structs, this method returns nil.

## Discussion

Discussion Use this method if elementType is MTLDataType.struct.

## See Also

### Obtaining details for complex array elements

- [element()](metal/mtlarraytype/element().md)
- [elementPointerType()](metal/mtlarraytype/elementpointertype().md)
- [elementTextureReferenceType()](metal/mtlarraytype/elementtexturereferencetype().md)
