Generic Instance Method 総称体インスタンスメソッド

encode(_:)

Encodes a single value of the given type. 与えられた型の単一の値をエンコードします。

Declaration 宣言

mutating func encode<T>(_ value: T) throws where T : Encodable

Parameters パラメータ

value

The value to encode. エンコードする値。

Discussion 解説

Precondition: May not be called after a previous self.encode(_:) call. 前提条件:前のself.encode(_:)呼び出しの後に呼び出されないこと。