Initializer

init(from:)

Creates a new array by decoding from the given decoder. 新しい配列を指定のエンコーダからエンコードすることによって作成します。

Declaration 宣言

init(from decoder: Decoder) throws
Available when Element conforms to Decodable. ElementDecodableに準拠する時に利用可能です。

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 エンコーディングとデコーディング