InitializerSwift

init(from:)

Creates a new array by decoding from the given decoder.

init(from decoder: Decoder) throws

Parameters

decoder

The decoder to read data from.

Overview

This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.