A type-erased hashable value.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Overview
The Any
type forwards equality comparisons and hashing operations to an underlying hashable value, hiding its specific underlying type.
You can store mixed-type keys in dictionaries and other collections that require Hashable
conformance by wrapping mixed-type keys in Any
instances: