---
title: AnyKeyPath
framework: swift
role: symbol
role_heading: Class
path: swift/anykeypath
---

# AnyKeyPath

A type-erased key path, from any root type to any resulting value type.

## Declaration

```swift
class AnyKeyPath
```

## Topics

### Type Properties

- [rootType](swift/anykeypath/roottype.md)
- [valueType](swift/anykeypath/valuetype.md)

### Default Implementations

- [CustomDebugStringConvertible Implementations](swift/anykeypath/customdebugstringconvertible-implementations.md)
- [Equatable Implementations](swift/anykeypath/equatable-implementations.md)
- [Hashable Implementations](swift/anykeypath/hashable-implementations.md)

## Relationships

### Inherited By

- [PartialKeyPath](swift/partialkeypath.md)

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)

## See Also

### Key Paths

- [KeyPath](swift/keypath.md)
- [PartialKeyPath](swift/partialkeypath.md)
