OptionalKey

public struct OptionalKey

A key in a keyPath that may or may not be required.

Trying to access a invalid key in a dictionary with an OptionalKey will usually result in a nil return value instead of a thrown error. Unless isRequired is true, in which it behaves as a normal String inside a normal KeyPath.

  • key

    Undocumented

    Declaration

    Swift

    public var key: String
  • Undocumented

    Declaration

    Swift

    public var isRequired: Bool
  • Declaration

    Swift

    public var description: String { get }