Skip to content

Instantly share code, notes, and snippets.

View Gabriel-Cervo's full-sized avatar

João Gabriel Dourado Cervo Gabriel-Cervo

View GitHub Profile
import Foundation
/// Provides a default value for missing `Decodable` data.
///
/// `DefaultCodableStrategy` provides a generic strategy type that the `DefaultCodable` property wrapper can use to provide a reasonable default value for missing Decodable data.
public protocol DefaultCodableStrategy {
associatedtype RawValue: Codable
static var defaultValue: RawValue { get }
}