Protocol

SingleValueEncodingContainer

A container that can support the storage and direct encoding of a single non-keyed value.

Declaration

protocol SingleValueEncodingContainer

Topics

Instance Properties

var codingPath: [CodingKey]

The path of coding keys taken to get to this point in encoding.

Required.

Instance Methods

func encode(UInt16)

Encodes a single value of the given type.

Required.

func encode(Int64)

Encodes a single value of the given type.

Required.

func encode(Int8)

Encodes a single value of the given type.

Required.

func encode(Double)

Encodes a single value of the given type.

Required.

func encode(String)

Encodes a single value of the given type.

Required.

func encode(UInt64)

Encodes a single value of the given type.

Required.

func encode(UInt8)

Encodes a single value of the given type.

Required.

func encode(Float)

Encodes a single value of the given type.

Required.

func encode(UInt32)

Encodes a single value of the given type.

Required.

func encode(UInt)

Encodes a single value of the given type.

Required.

func encode(Int16)

Encodes a single value of the given type.

Required.

func encode(Int)

Encodes a single value of the given type.

Required.

func encode(Bool)

Encodes a single value of the given type.

Required.

func encode(Int32)

Encodes a single value of the given type.

Required.

func encode<T>(T)

Encodes a single value of the given type.

Required.

func encodeNil()

Encodes a null value.

Required.

See Also

Encoding Containers

struct KeyedEncodingContainer

A concrete container that provides a view into an encoder’s storage, making the encoded properties of an encodable type accessible by keys.

protocol KeyedEncodingContainerProtocol

A type that provides a view into an encoder’s storage and is used to hold the encoded properties of an encodable type in a keyed manner.

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.