SingleValueEncodingContainer
A container that can support the storage and direct encoding of a single non-keyed value.
protocol SingleValueEncodingContainer
Requirements
var codingPath: [CodingKey]
The path of coding keys taken to get to this point in encoding.
func encode(String
) throws Encodes a single value of the given type.
func encode(Bool
) throws Encodes a single value of the given type.
func encode(Double
) throws Encodes a single value of the given type.
func encode(Float
) throws Encodes a single value of the given type.
func encode(Int
) throws Encodes a single value of the given type.
func encode(UInt
) throws Encodes a single value of the given type.
func encode<T>(T
) throws Encodes a single value of the given type.
func encode(Int8
) throws Encodes a single value of the given type.
func encode(Int16
) throws Encodes a single value of the given type.
func encode(Int32
) throws Encodes a single value of the given type.
func encode(Int64
) throws Encodes a single value of the given type.
func encode(UInt8
) throws Encodes a single value of the given type.
func encode(UInt16
) throws Encodes a single value of the given type.
func encode(UInt32
) throws Encodes a single value of the given type.
func encode(UInt64
) throws Encodes a single value of the given type.
func encodeNil(
) throws Encodes a null value.