ExplicitNull
public enum ExplicitNull<C> : Codable, Sendable where C : Decodable, C : Encodable, C : Sendable
A twist on Optional that, in a KeyedValueContainer, can distinguish between being unset entirely and being explicitly set to the nil value.
-
Declaration
Swift
case absent
-
Declaration
Swift
case null
-
Declaration
Swift
case present(C)
-
Declaration
Swift
public init(from decoder: any Decoder) throws
-
Declaration
Swift
public func encode(to encoder: any Encoder) throws