encode(to:)
Writes the token’s data into an encoder.
Declaration
final func encode(to encoder: any Encoder) throwsParameters
- encoder:
The encoder to write data to.
Discussion
If the value fails to encode anything, encoder will encode an empty keyed container. This function throws an Error if any values are invalid for the given encoder’s format.