DataConvertible
public protocol DataConvertible
A type to transform Data to Self of conforming instance.
-
Returns
Selfof caller instance type if possible fromData, otherwise throws.Throws
AnDataConversionErrorerror instance.Declaration
Swift
static func convert(from data: Data) throws -> SelfReturn Value
The
Selfinitialized withData. -
convert(from:Extension method) Returns
Selfof caller instance type if possible fromData, otherwise throws.Throws
AnDataConversionErrorerror instance.Declaration
Swift
static func convert(from data: Data? = nil) throws -> SelfReturn Value
The
Selfinitialized withData.