ValidatingKeyedContainer
struct ValidatingKeyedContainer<Key> : KeyedDecodingContainerProtocol where Key : CodingKey
-
Declaration
Swift
let wrappedContainer: KeyedDecodingContainer<`Self`.Key> -
Declaration
Swift
let wrappingDecoder: ValidatingDecoder -
Declaration
Swift
var codingPath: [CodingKey] { get } -
Declaration
Swift
var allKeys: [Key] { get } -
Declaration
Swift
init(wrapping: KeyedDecodingContainer<Key>, for decoder: ValidatingDecoder) -
Declaration
Swift
func validate(_ test: Bool, forKey: Key, or errorString: String? = nil) -
Declaration
Swift
func validateStrLenOptional( _ str: String?, nilOkay: Bool = true, min: Int = 0, max: Int = Int.max, forKey: Key, fieldName: String? = nil, or errorString: String? = nil ) -
Declaration
Swift
func validateStrLen( _ str: String, min: Int = 0, max: Int = Int.max, forKey: Key, fieldName: String? = nil, or errorString: String? = nil ) -
Declaration
Swift
func addValidationError(forKey: Key?, errorString: String) -
Declaration
Swift
func contains(_ key: Key) -> Bool -
Declaration
Swift
func decode<Z>(_ type: Z.Type, forKey key: Key) throws -> Z where Z : Decodable -
Declaration
Swift
func decodeIfPresent<Z>(_ type: Z.Type, forKey key: Key) throws -> Z? where Z : Decodable -
Declaration
Swift
func decodeNil(forKey key: Key) throws -> Bool -
Declaration
Swift
func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type, forKey key: Key) throws -> KeyedDecodingContainer<NestedKey> where NestedKey: CodingKey -
Declaration
Swift
func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer -
Declaration
Swift
func superDecoder() throws -> Decoder -
Declaration
Swift
func superDecoder(forKey key: Key) throws -> Decoder
View on GitHub