Protocolswift 6.0.1Swift
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.
protocol UnkeyedEncodingContainer
Encoders should provide types conforming to UnkeyedEncodingContainer
for their format.
Requirements
Instance members
var codingPath: [any CodingKey]
The path of coding keys taken to get to this point in encoding.
var count: Int
The number of elements encoded into the container.
func encode(String
) throws Encodes the given value.
func encode(Bool
) throws Encodes the given value.
func encode(Double
) throws Encodes the given value.
func encode(Float
) throws Encodes the given value.
func encode(Int
) throws Encodes the given value.
func encode(UInt
) throws Encodes the given value.
func encode<T>(T
) throws Encodes the given value.
func encode(Int8
) throws Encodes the given value.
func encode(Int16
) throws Encodes the given value.
func encode(Int32
) throws Encodes the given value.
func encode(Int64
) throws Encodes the given value.
func encode(UInt8
) throws Encodes the given value.
func encode(Int128
) throws Encodes the given value.
func encode(UInt16
) throws Encodes the given value.
func encode(UInt32
) throws Encodes the given value.
func encode(UInt64
) throws Encodes the given value.
func encode(UInt128
) throws Encodes the given value.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encode<T>(contentsOf: T
) throws Encodes the elements of the given sequence.
func encodeConditional<T>(T
) throws Encodes a reference to the given object only if it is encoded unconditionally elsewhere in the payload (previously, or in the future).
func encodeNil(
) throws Encodes a null value.
func nestedContainer<NestedKey>(keyedBy: NestedKey.Type
) -> KeyedEncodingContainer<NestedKey> Encodes a nested container keyed by the given type and returns it.
func nestedUnkeyedContainer(
) -> any UnkeyedEncodingContainer Encodes an unkeyed encoding container and returns it.
func superEncoder(
) -> any Encoder Encodes a nested container and returns an
Encoder
instance for encodingsuper
into that container.
Citizens in Swift
Instance members
func encode(Int128
) throws func encode(UInt128
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encode<T>(contentsOf: T
) throws func encodeConditional<T>(T
) throws