AnyHashableAndSendable

public struct AnyHashableAndSendable : @unchecked Sendable, Hashable, Equatable
extension AnyHashableAndSendable: CustomStringConvertible

A type-erased wrapper for hashable values that are safe to send across concurrency domains.

  • The type-erased hashable value.

    Declaration

    Swift

    public let anyHashable: AnyHashable
  • Boxes the given object of a concrete type conforming to Hashable and Sendable.

    Declaration

    Swift

    public init(wrapping w: some Hashable & Sendable)
  • Equality based on the underlying values’ equality.

    Declaration

    Swift

    public static func == (lhs: `Self`, rhs: `Self`) -> Bool
  • Hashes the underlying value into the given hasher.

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public var description: String { get }