---
title: EmptyCollection
framework: swift
role: symbol
role_heading: Structure
path: swift/emptycollection
---

# EmptyCollection

A collection whose element type is Element but that is always empty.

## Declaration

```swift
@frozen struct EmptyCollection<Element>
```

## Topics

### Initializers

- [init()](swift/emptycollection/init().md)

### Instance Methods

- [withBytes(_:)](swift/emptycollection/withbytes(_:).md)

### Default Implementations

- [BidirectionalCollection Implementations](swift/emptycollection/bidirectionalcollection-implementations.md)
- [Collection Implementations](swift/emptycollection/collection-implementations.md)
- [Equatable Implementations](swift/emptycollection/equatable-implementations.md)
- [Hashable Implementations](swift/emptycollection/hashable-implementations.md)
- [MutableCollection Implementations](swift/emptycollection/mutablecollection-implementations.md)
- [RandomAccessCollection Implementations](swift/emptycollection/randomaccesscollection-implementations.md)
- [Sequence Implementations](swift/emptycollection/sequence-implementations.md)

## Relationships

### Conforms To

- [BidirectionalCollection](swift/bidirectionalcollection.md)
- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Collection](swift/collection.md)
- [ContiguousBytes](foundation/contiguousbytes.md)
- [Copyable](swift/copyable.md)
- [DataProtocol](foundation/dataprotocol.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [MutableCollection](swift/mutablecollection.md)
- [RandomAccessCollection](swift/randomaccesscollection.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Sequence](swift/sequence.md)

## See Also

### Special-Use Collections

- [repeatElement(_:count:)](swift/repeatelement(_:count:).md)
- [CollectionOfOne](swift/collectionofone.md)
- [KeyValuePairs](swift/keyvaluepairs.md)
- [DictionaryLiteral](swift/dictionaryliteral.md)
