IntermediateDecoder

public protocol IntermediateDecoder

This protocol provides a blueprint for an intermediate decoder, that does simply delegate the task of decoding to a Decoder.

  • Raw

    the raw type you encode to and decode from, for example Data

    Declaration

    Swift

    associatedtype Raw
  • decode(toType:from:) Default implementation

    decodes a value of the given type from a raw representation

    Default Implementation

    decodes a value of the given type from a raw representation

    Declaration

    Swift

    func decode<D>(toType type: D.Type, from raw: Raw) throws -> D where D : Decodable
  • returns a new MetaDecoder

    Declaration

    Swift

    func provideNewDecoder() -> MetaDecoder
  • Declaration

    Swift

    func convert(raw: Raw) throws -> Meta