---
title: AnyIndex
framework: swift
role: symbol
role_heading: Structure
path: swift/anyindex
---

# AnyIndex

A wrapper over an underlying index that hides the specific underlying type.

## Declaration

```swift
@frozen struct AnyIndex
```

## Topics

### Initializers

- [init(_:)](swift/anyindex/init(_:).md)

### Default Implementations

- [Comparable Implementations](swift/anyindex/comparable-implementations.md)
- [Equatable Implementations](swift/anyindex/equatable-implementations.md)

## Relationships

### Conforms To

- [Comparable](swift/comparable.md)
- [Equatable](swift/equatable.md)

## See Also

### Type-Erasing Wrappers

- [AnySequence](swift/anysequence.md)
- [AnyCollection](swift/anycollection.md)
- [AnyBidirectionalCollection](swift/anybidirectionalcollection.md)
- [AnyRandomAccessCollection](swift/anyrandomaccesscollection.md)
- [AnyIterator](swift/anyiterator.md)
- [AnyHashable](swift/anyhashable.md)
