---
title: "setItems(_:for:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdlayer/listoperation/setitems(_:for:)"
---

# setItems(_:for:)

Sets the items in the given operation’s slot.

## Declaration

```swift
mutating func setItems(_ items: [T], for operation: USDLayer.ListOperationType) throws
```

## Parameters

- `items`: The new items.
- `operation`: The slot to update.

## Discussion

Discussion note: An error if any item fails validation.
