decodeIfPresent(_:forKey:)
func decodeIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> T? where T : Decodable
func decodeIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> T? where T : Decodable
ss30KeyedDecodingContainerProtocolPsE15decodeIfPresent_6forKeyqd__Sgqd__m_0I0QztKSeRd__lF
What are these?2O9MB
import Swift
protocol KeyedDecodingContainerProtocol
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.
associatedtype Key : CodingKey
protocol Decodable
A type that can decode itself from an external representation.
func decodeIfPresent(_ type: String.Type, forKey key: Self.Key) throws -> String?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Bool.Type, forKey key: Self.Key) throws -> Bool?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Double.Type, forKey key: Self.Key) throws -> Double?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Float.Type, forKey key: Self.Key) throws -> Float?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Int.Type, forKey key: Self.Key) throws -> Int?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: UInt.Type, forKey key: Self.Key) throws -> UInt?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> T? where T : Decodable
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Int8.Type, forKey key: Self.Key) throws -> Int8?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Int16.Type, forKey key: Self.Key) throws -> Int16?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Int32.Type, forKey key: Self.Key) throws -> Int32?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Int64.Type, forKey key: Self.Key) throws -> Int64?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: UInt8.Type, forKey key: Self.Key) throws -> UInt8?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: Int128.Type, forKey key: Self.Key) throws -> Int128?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: UInt16.Type, forKey key: Self.Key) throws -> UInt16?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: UInt32.Type, forKey key: Self.Key) throws -> UInt32?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: UInt64.Type, forKey key: Self.Key) throws -> UInt64?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(_ type: UInt128.Type, forKey key: Self.Key) throws -> UInt128?
Decodes a value of the given type for the given key, if present.
func decode(_ type: Int128.Type, forKey key: Self.Key) throws -> Int128
func decode(_ type: UInt128.Type, forKey key: Self.Key) throws -> UInt128
func decodeIfPresent(_ type: String.Type, forKey key: Self.Key) throws -> String?
func decodeIfPresent(_ type: Bool.Type, forKey key: Self.Key) throws -> Bool?
func decodeIfPresent(_ type: Double.Type, forKey key: Self.Key) throws -> Double?
func decodeIfPresent(_ type: Float.Type, forKey key: Self.Key) throws -> Float?
func decodeIfPresent(_ type: Int.Type, forKey key: Self.Key) throws -> Int?
func decodeIfPresent(_ type: UInt.Type, forKey key: Self.Key) throws -> UInt?
func decodeIfPresent(_ type: Int8.Type, forKey key: Self.Key) throws -> Int8?
func decodeIfPresent(_ type: Int16.Type, forKey key: Self.Key) throws -> Int16?
func decodeIfPresent(_ type: Int32.Type, forKey key: Self.Key) throws -> Int32?
func decodeIfPresent(_ type: Int64.Type, forKey key: Self.Key) throws -> Int64?
func decodeIfPresent(_ type: UInt8.Type, forKey key: Self.Key) throws -> UInt8?
func decodeIfPresent(_ type: Int128.Type, forKey key: Self.Key) throws -> Int128?
func decodeIfPresent(_ type: UInt16.Type, forKey key: Self.Key) throws -> UInt16?
func decodeIfPresent(_ type: UInt32.Type, forKey key: Self.Key) throws -> UInt32?
func decodeIfPresent(_ type: UInt64.Type, forKey key: Self.Key) throws -> UInt64?
func decodeIfPresent(_ type: UInt128.Type, forKey key: Self.Key) throws -> UInt128?