Wrapper

@propertyWrapper
struct Wrapper<Source> where Source : DecodableDefaultSource
extension DecodableDefault.Wrapper: Decodable
extension DecodableDefault.Wrapper: Encodable where ValueType: Encodable
extension DecodableDefault.Wrapper: Equatable where ValueType: Equatable
extension DecodableDefault.Wrapper: Hashable where ValueType: Hashable

Undocumented

  • Undocumented

    Declaration

    Swift

    typealias DefaultSource = Source
  • Undocumented

    Declaration

    Swift

    typealias ValueType = Source.ValueType
  • Undocumented

    Declaration

    Swift

    var wrappedValue: Source.ValueType
  • Constructor for a new DecodableDefaultSource wrapper that takes a value from the given decoder.

    Declaration

    Swift

    init(from decoder: Decoder) throws

    Parameters

    decoder

    provider of values

Available where ValueType: Encodable

  • Encode the wrapped value in the given encoder.

    Declaration

    Swift

    func encode(to encoder: Encoder) throws

    Parameters

    encoder

    the container for the wrapped value