DataConvertible

master

Swift code to convert any type to Data and initialise any type from Data
raphaelwach/DataConvertible

DataConvertible

Purpose

Convert any Swift type to Data and initialize any Swift type from Data.

Usage

// T can be Data, String, Int, Int8, Int16, Int32, Int64, Float, Double, Date, Array, Set, Dictionary
let x: T

// Return the content of x as Data
x.binaryData

// Initialize an instance of type T from the content of a Data value
let y = T(binaryData: d) 

Author: Raphaƫl Wach
@raphaelwach

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Nov 07 2022 23:24:59 GMT-0500 (GMT-05:00)