ToFromData
public protocol ToFromData
A simple protocol for things that we want
to be able to serialize-to and reconstitute-from Data
-
Serialize self to
Data
Declaration
Swift
func toData() throws -> Data
-
Deserialize from
Data
Declaration
Swift
static func fromData(_ data: Data) throws -> Self