A concrete container that provides a view into a decoder’s storage, making the encoded properties of a decodable type accessible by keys.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
A concrete container that provides a view into a decoder’s storage, making the encoded properties of a decodable type accessible by keys.
SDK
Framework
init<Container>(Container)
Creates a new instance with the given container.
var all Keys: [K]
All the keys the decoder has for this container.
var coding Path: [Coding Key]
The path of coding keys taken to get to this point in decoding.
func contains(Keyed Decoding Container<K>.Key) -> Bool
Returns a Boolean value indicating whether the decoder contains a value associated with the given key.
func decode(Double .Type, for Key: Keyed Decoding Container<K>.Key) -> Double
Decodes a value of the given type for the given key.
func decode(UInt64 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt64
Decodes a value of the given type for the given key.
func decode(Int64 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int64
Decodes a value of the given type for the given key.
func decode(UInt16 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt16
Decodes a value of the given type for the given key.
func decode(String .Type, for Key: Keyed Decoding Container<K>.Key) -> String
Decodes a value of the given type for the given key.
func decode(Int32 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int32
Decodes a value of the given type for the given key.
func decode(Bool .Type, for Key: Keyed Decoding Container<K>.Key) -> Bool
Decodes a value of the given type for the given key.
func decode<T>(T .Type, for Key: Keyed Decoding Container<K>.Key) -> T
Decodes a value of the given type for the given key.
func decode(UInt8 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt8
Decodes a value of the given type for the given key.
func decode(UInt32 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt32
Decodes a value of the given type for the given key.
func decode(Int8 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int8
Decodes a value of the given type for the given key.
func decode(Float .Type, for Key: Keyed Decoding Container<K>.Key) -> Float
Decodes a value of the given type for the given key.
func decode(Int .Type, for Key: Keyed Decoding Container<K>.Key) -> Int
Decodes a value of the given type for the given key.
func decode(Int16 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int16
Decodes a value of the given type for the given key.
func decode(UInt .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt
Decodes a value of the given type for the given key.
func decode If Present(Int .Type, for Key: Keyed Decoding Container<K>.Key) -> Int?
Decodes a value of the given type for the given key, if present.
func decode If Present(Bool .Type, for Key: Keyed Decoding Container<K>.Key) -> Bool?
Decodes a value of the given type for the given key, if present.
func decode If Present(String .Type, for Key: Keyed Decoding Container<K>.Key) -> String?
Decodes a value of the given type for the given key, if present.
func decode If Present(UInt32 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt32?
Decodes a value of the given type for the given key, if present.
func decode If Present(UInt16 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt16?
Decodes a value of the given type for the given key, if present.
func decode If Present(UInt64 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt64?
Decodes a value of the given type for the given key, if present.
func decode If Present(UInt .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt?
Decodes a value of the given type for the given key, if present.
func decode If Present(Int64 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int64?
Decodes a value of the given type for the given key, if present.
func decode If Present(UInt8 .Type, for Key: Keyed Decoding Container<K>.Key) -> UInt8?
Decodes a value of the given type for the given key, if present.
func decode If Present(Int8 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int8?
Decodes a value of the given type for the given key, if present.
func decode If Present(Int32 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int32?
Decodes a value of the given type for the given key, if present.
func decode If Present<T>(T .Type, for Key: Keyed Decoding Container<K>.Key) -> T?
Decodes a value of the given type for the given key, if present.
func decode If Present(Double .Type, for Key: Keyed Decoding Container<K>.Key) -> Double?
Decodes a value of the given type for the given key, if present.
func decode If Present(Float .Type, for Key: Keyed Decoding Container<K>.Key) -> Float?
Decodes a value of the given type for the given key, if present.
func decode If Present(Int16 .Type, for Key: Keyed Decoding Container<K>.Key) -> Int16?
Decodes a value of the given type for the given key, if present.
func decode Nil(for Key: Keyed Decoding Container<K>.Key) -> Bool
Decodes a null value for the given key.
func nested Container<Nested Key>(keyed By: Nested Key .Type, for Key: Keyed Decoding Container<K>.Key) -> Keyed Decoding Container<Nested Key>
Returns the data stored for the given key as represented in a container keyed by the given key type.
func nested Unkeyed Container(for Key: Keyed Decoding Container<K>.Key) -> Unkeyed Decoding Container
Returns the data stored for the given key as represented in an unkeyed container.
func super Decoder() -> Decoder
Returns a Decoder
instance for decoding super
from the container associated with the default super
key.
func super Decoder(for Key: Keyed Decoding Container<K>.Key) -> Decoder
Returns a Decoder
instance for decoding super
from the container associated with the given key.
protocol Single Value Decoding Container
A container that can support the storage and direct decoding of a single nonkeyed value.
protocol Keyed Decoding Container Protocol
A type that provides a view into a decoder’s storage and is used to hold the encoded properties of a decodable type in a keyed manner.
protocol Unkeyed Decoding Container
A type that provides a view into a decoder’s storage and is used to hold the encoded properties of a decodable type sequentially, without keys.