DataDecoder
public protocol DataDecoder : Sendable
Any type which can decode Data into a Decodable type.
-
Decode
Datainto the provided type.Throws
Any error that occurs during decode.
Declaration
Swift
func decode<D>(_ type: D.Type, from data: Data) throws -> D where D : DecodableParameters
typeThe
Typeto be decoded.dataThe
Datato be decoded.Return Value
The decoded value of type
D.
View on GitHub
Install in Dash