Required Instance Methodswift 6.0.1Swift
encode(contentsOf:)
Encodes the elements of the given sequence.
mutating func encode<T>(contentsOf sequence: T) throws where T : Sequence, T.Element == Int
Parameters
- sequence
The sequences whose contents to encode.
Throws
An error if any of the contained values throws an error.
Other requirements
View members
Hide members
This section is hidden by default because it contains too many (40) members.
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 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
Default implementations
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