SingleValueEncodingContainer
A container that can support the storage and direct encoding of a single non-keyed value.
protocol SingleValueEncodingContainer
Browse conforming typesA container that can support the storage and direct encoding of a single non-keyed value.
protocol SingleValueEncodingContainer
import Swift
var codingPath: [any CodingKey] { get }
The path of coding keys taken to get to this point in encoding.
mutating func encode(_ value: String) throws
Encodes a single value of the given type.
mutating func encode(_ value: Bool) throws
Encodes a single value of the given type.
mutating func encode(_ value: Double) throws
Encodes a single value of the given type.
mutating func encode(_ value: Float) throws
Encodes a single value of the given type.
mutating func encode(_ value: Int) throws
Encodes a single value of the given type.
mutating func encode(_ value: UInt) throws
Encodes a single value of the given type.
mutating func encode<T>(_ value: T) throws where T : Encodable
Encodes a single value of the given type.
mutating func encode(_ value: Int8) throws
Encodes a single value of the given type.
mutating func encode(_ value: Int16) throws
Encodes a single value of the given type.
mutating func encode(_ value: Int32) throws
Encodes a single value of the given type.
mutating func encode(_ value: Int64) throws
Encodes a single value of the given type.
mutating func encode(_ value: UInt8) throws
Encodes a single value of the given type.
mutating func encode(_ value: Int128) throws
Encodes a single value of the given type.
mutating func encode(_ value: UInt16) throws
Encodes a single value of the given type.
mutating func encode(_ value: UInt32) throws
Encodes a single value of the given type.
mutating func encode(_ value: UInt64) throws
Encodes a single value of the given type.
mutating func encode(_ value: UInt128) throws
Encodes a single value of the given type.
mutating func encodeNil() throws
Encodes a null value.
mutating func encode(_ value: Int128) throws
mutating func encode(_ value: UInt128) throws
protocol UnkeyedEncodingContainer
A type that provides a view into an encoder’s storage and is used to hold the encoded properties of an encodable type sequentially, without keys.
mutating func encode(_ value: Int128) throws
mutating func encode(_ value: UInt128) throws