Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

DataDecoder

mattt edited this page Sep 18, 2020 · 2 revisions

DataDecoder

Any type which can decode Data into a Decodable type.

public protocol DataDecoder

Requirements

decode(_:​from:​)

Decode Data into the provided type.

func decode<D:​ Decodable>(_ type:​ D.Type, from data:​ Data) throws -> D

Parameters

  • type:​ The Type to be decoded.
  • data:​ The Data to be decoded.

Throws

Any error that occurs during decode.

Returns

The decoded value of type D.

Types
Protocols
Global Typealiases
Clone this wiki locally