Created
June 15, 2018 10:56
-
-
Save onmyway133/f1b2817452f40a0d672e379162b45ba3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Transformer<T> { | |
let toData: (T) throws -> Data | |
let fromData: (Data) throws -> T | |
public init(toData: @escaping (T) throws -> Data, fromData: @escaping (Data) throws -> T) { | |
self.toData = toData | |
self.fromData = fromData | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment