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.