---
title: CollectionOfOne.Iterator
framework: swift
role: symbol
role_heading: Structure
path: swift/collectionofone/iterator
---

# CollectionOfOne.Iterator

An iterator that produces one or zero instances of an element.

## Declaration

```swift
@frozen struct Iterator
```

## Overview

Overview IteratorOverOne is the iterator for the CollectionOfOne type.

## Topics

### Default Implementations

- [IteratorProtocol Implementations](swift/collectionofone/iterator/iteratorprotocol-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [IteratorProtocol](swift/iteratorprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
