Generic Instance Method 総称体インスタンスメソッド

encode(_:forKey:)

Encodes the given value for the given key. 与えられたキーに対して与えられた値をエンコードします。

Declaration 宣言

mutating func encode<T>(_ value: T, forKey key: Self.Key) throws where T : Encodable

Parameters パラメータ

value

The value to encode. エンコードする値。

key

The key to associate the value with. 値と関連付けられるキー。