encode(_:to:)
Encodes a value to the provided encoder.
Declaration
static func encode(_ value: Self.Value, to encoder: any Encoder) throwsParameters
- value:
The value to encode.
- encoder:
The encoder to write data to.
Discussion
This method throws an error if writing to the encoder fails.