DataEncodingStrategy
public enum DataEncodingStrategy
The strategy to use for encoding Data
values.
-
Defer to
Data
for choosing an encoding.Declaration
Swift
case deferredToData
-
Encoded the
Data
as a Base64-encoded string. This is the default strategy.Declaration
Swift
case base64
-
don’t encode. This is the default strategy.
Declaration
Swift
case raw
-
Encode the
Data
as a custom value encoded by the given closure.If the closure fails to encode a value into the given encoder, the encoder will encode an empty automatic container in its place.
Declaration
Swift
case custom((Data, Encoder) throws -> Void)