Skip to content

Initializer

init(from:)

Deprecated

This type violates Codable invariants; using it is not safe.

Creates a new instance by decoding from the given decoder.
init(from decoder: any Decoder)

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.