Instance Method インスタンスメソッド

encode(to:)

Encodes the elements of this array into the given encoder in an unkeyed container. この配列の要素を指定されたエンコーダへとあるキー付けされないコンテナにおいてエンコードします。

Declaration 宣言

func encode(to encoder: Encoder) throws
Available when Element conforms to Encodable. ElementEncodableに準拠する時に利用可能です。

Parameters パラメータ

encoder

The encoder to write data to. データを書き込むエンコーダ。

Discussion 解説

This function throws an error if any values are invalid for the given encoder’s format. この関数は、与えられたエンコーダの形式に対して何らかの値が無効であるならばエラーをスローします。

Relationships 関係

From Protocol 由来プロトコル

See Also 参照

Encoding and Decoding エンコーディングとデコーディング