Skip to content

Structure

SomeCodingKey

A straightforward implementation of CodingKey, used to represent arbitrary keys.
struct SomeCodingKey

Overview

This type is a simple helper, compensating for the inability to depend on the presence of CodingKeyRepresentable (introduced in Swift 5.6 and tagged with a macOS 12.3/iOS 15.4 availability requirement) without a major version bump.

Note

Both the purpose and implementation of this type are almost exactly identical to those of the standard library’s internal _DictionaryCodingKey type.

Quotation

Topics

Initializers

Instance Properties

  • intValue
    The value to use in an integer-indexed collection (e.g. an int-keyed dictionary).
  • stringValue
    The string to use in a named collection (e.g. a string-keyed dictionary).

Relationships

Conforms To

  • Swift.CodingKey
  • Swift.CustomDebugStringConvertible
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype