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

encode(to:)

Encodes this value into the given encoder, when the type’s RawValue is Int. この値をその与えられたデコーダへとデコードします、その型のもつRawValueIntである場合。

Declaration 宣言

func encode(to encoder: Encoder) throws

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. この関数は、何らかの値がその与えられたエンコーダのもつ書式に対して無効であるならばエラーをスローします。