DefaultCodable
@propertyWrapper
public struct DefaultCodable<Default> where Default : DefaultCodableStrategy
extension DefaultCodable: Decodable where Default.DefaultValue: Decodable
extension DefaultCodable: Encodable where Default.DefaultValue: Encodable
extension DefaultCodable: Equatable where Default.DefaultValue: Equatable
extension DefaultCodable: Hashable where Default.DefaultValue: Hashable
Decodes values with a reasonable default value
@Defaultable
attempts to decode a value and falls back to a default type provided by the generic
DefaultCodableStrategy
.
-
Undocumented
Declaration
Swift
public var wrappedValue: Default.DefaultValue
-
Undocumented
Declaration
Swift
public init(wrappedValue: Default.DefaultValue)
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws