CodingUserInfoKey

struct CodingUserInfoKey

A user-defined key for providing context during encoding and decoding.

Inheritance RawRepresentable, Equatable, Hashable
Associated Types
public typealias RawValue = String

Every distinct value of the conforming type has a corresponding unique value of the RawValue type, but there may be values of the RawValue type that don't have a corresponding value of the conforming type.

Initializers

init init?(rawValue:) Required

Creates a new instance with the given raw value.

  • parameter rawValue: The value of the key.

Declaration

public init?(rawValue: String)

Instance Variables

var hashValue Required

The key's hash value.

Declaration

var hashValue: Int
let rawValue Required

The key's string value.

Declaration

let rawValue: String

Instance Methods

func hash(into hasher: inout Hasher) Required

Hashes the essential components of this value by feeding them into the given hasher.

  • Parameter hasher: The hasher to use when combining the components of this instance.

Declaration

public func hash(into hasher: inout Hasher)

Type Methods

func !=(lhs: Self, rhs: Self) -> Bool Required

Declaration

public static func !=(lhs: Self, rhs: Self) -> Bool
func ==(lhs: CodingUserInfoKey, rhs: CodingUserInfoKey) -> Bool Required

Returns a Boolean value indicating whether the given keys are equal.

  • parameter lhs: The key to compare against.
  • parameter rhs: The key to compare with.

Declaration

public static func ==(lhs: CodingUserInfoKey, rhs: CodingUserInfoKey) -> Bool