SingleValueDecodingContainer

protocol SingleValueDecodingContainer

A container that can support the storage and direct decoding of a single nonkeyed value.

Instance Variables

var codingPath Required

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

Declaration

var codingPath: [CodingKey]

Instance Methods

func decode(_ type: Bool.Type) throws -> Bool Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Bool.Type) throws -> Bool
func decode(_ type: String.Type) throws -> String Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: String.Type) throws -> String
func decode(_ type: Double.Type) throws -> Double Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Double.Type) throws -> Double
func decode(_ type: Float.Type) throws -> Float Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Float.Type) throws -> Float
func decode(_ type: Int.Type) throws -> Int Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Int.Type) throws -> Int
func decode(_ type: Int8.Type) throws -> Int8 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Int8.Type) throws -> Int8
func decode(_ type: Int16.Type) throws -> Int16 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Int16.Type) throws -> Int16
func decode(_ type: Int32.Type) throws -> Int32 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Int32.Type) throws -> Int32
func decode(_ type: Int64.Type) throws -> Int64 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: Int64.Type) throws -> Int64
func decode(_ type: UInt.Type) throws -> UInt Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: UInt.Type) throws -> UInt
func decode(_ type: UInt8.Type) throws -> UInt8 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: UInt8.Type) throws -> UInt8
func decode(_ type: UInt16.Type) throws -> UInt16 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: UInt16.Type) throws -> UInt16
func decode(_ type: UInt32.Type) throws -> UInt32 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: UInt32.Type) throws -> UInt32
func decode(_ type: UInt64.Type) throws -> UInt64 Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode(_ type: UInt64.Type) throws -> UInt64
func decode(_ type: T.Type) throws -> T Required

Decodes a single value of the given type.

  • parameter type: The type to decode as.

Declaration

func decode<T>(_ type: T.Type) throws -> T where T: Decodable
func decodeNil() -> Bool Required

Decodes a null value.

Declaration

func decodeNil() -> Bool