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

nestedContainer(keyedBy:forKey:)

Stores a keyed encoding container for the given key and returns it. キー付けされたエンコーディングコンテナを指定キーに対して供給して、それを返します。

Declaration 宣言

mutating func nestedContainer<NestedKey>(keyedBy keyType: NestedKey.Type, forKey key: Self.Key) -> KeyedEncodingContainer<NestedKey> where NestedKey : CodingKey

Parameters パラメータ

keyType

The key type to use for the container. コンテナに対して使うためのキー型。

key

The key to encode the container for. それに対してコンテナをエンコードすることになるキー。

Return Value 戻り値

A new keyed encoding container. 新しいキー付けされるエンコーディングコンテナ。