<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDLayer/ListOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDLayerV13ListOperationV"
  },
  "title" : "USDLayer.ListOperation"
}
-->

# USDLayer.ListOperation

A non-destructive list of incremental editing operations for
list-valued metadata and properties.

```
struct ListOperation<T> where T : USDLayer._ListOperationElement
```

## Topics

### Initializers

[`init(explicitItems: [T])`](/documentation/USDKit/USDLayer/ListOperation/init(explicitItems:)-4klr9)

Creates an explicit-mode list operation with the given items.

[`init(explicitItems: [Int])`](/documentation/USDKit/USDLayer/ListOperation/init(explicitItems:)-6l0al)

[`init(explicitItems: [UInt])`](/documentation/USDKit/USDLayer/ListOperation/init(explicitItems:)-7iesv)

[`init(prependedItems: [T], appendedItems: [T], deletedItems: [T])`](/documentation/USDKit/USDLayer/ListOperation/init(prependedItems:appendedItems:deletedItems:)-1tkyo)

Creates a list operation with the given prepended/appended/deleted
items. Pass no arguments for an empty operation with no slots authored.

[`init(prependedItems: [Int], appendedItems: [Int], deletedItems: [Int])`](/documentation/USDKit/USDLayer/ListOperation/init(prependedItems:appendedItems:deletedItems:)-8poys)

[`init(prependedItems: [UInt], appendedItems: [UInt], deletedItems: [UInt])`](/documentation/USDKit/USDLayer/ListOperation/init(prependedItems:appendedItems:deletedItems:)-ngyh)

### Instance Properties

[`var appliedItems: [T]`](/documentation/USDKit/USDLayer/ListOperation/appliedItems)

The composed result of applying all operations from strongest
to weakest opinion.

[`var hasKeys: Bool`](/documentation/USDKit/USDLayer/ListOperation/hasKeys)

Whether any operation slot has been authored.

[`var isExplicit: Bool`](/documentation/USDKit/USDLayer/ListOperation/isExplicit)

Whether the operation is in explicit mode — i.e., its items
replace the entire list during composition.

### Instance Methods

[`func clear()`](/documentation/USDKit/USDLayer/ListOperation/clear())

Removes all authored slots, leaving an empty operation.

[`func clearAndMakeExplicit()`](/documentation/USDKit/USDLayer/ListOperation/clearAndMakeExplicit())

Removes all authored slots and switches to explicit mode with
no items.

[`func compose(stronger: USDLayer.ListOperation<T>, for: USDLayer.ListOperationType)`](/documentation/USDKit/USDLayer/ListOperation/compose(stronger:for:))

Composes a stronger operation into this one for the given slot.

[`func has(item: T) -> Bool`](/documentation/USDKit/USDLayer/ListOperation/has(item:))

Returns a Boolean value that indicates whether `item` appears in
any slot of this operation.

[`func items(for: USDLayer.ListOperationType) -> [T]`](/documentation/USDKit/USDLayer/ListOperation/items(for:))

Returns the items in the given operation’s slot.

[`func replaceItems(in: USDLayer.ListOperationType, at: Int, count: Int, with: [T]) throws`](/documentation/USDKit/USDLayer/ListOperation/replaceItems(in:at:count:with:))

Replaces `count` items in `operation`’s slot starting at `index`
with `newItems`.

[`func setItems([T], for: USDLayer.ListOperationType) throws`](/documentation/USDKit/USDLayer/ListOperation/setItems(_:for:))

Sets the items in the given operation’s slot.

## Relationships

### Conforms To

[`USDValueProtocol`](/documentation/USDKit/USDValueProtocol)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

---

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)