Initializer

init(from:)

Creates a new instance by decoding from the given decoder. 新しいインスタンスをこの与えられたデコーダからデコーディングすることによって作成します。

Declaration 宣言

init(from decoder: Decoder) throws

Parameters パラメータ

decoder

The decoder to read data from. このデコーダからデータを読み出すことになります。

Discussion 議論

This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid. このイニシャライザは、エラーをスローします、デコーダから読み出すことが失敗するならば、またはデータ読み出しが不正であるかでなければ無効であるならば。

Relationships 関係

From Protocol 由来プロトコル

See Also 参照

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