Created
March 1, 2019 18:39
-
-
Save IanKeen/9bff98b5f76eb61e631d6cdf21eec184 to your computer and use it in GitHub Desktop.
CodablePrimitives; Allows for easier handling of types for custom en/de-coders in certain situations
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
protocol CodablePrimitive { } | |
extension String: CodablePrimitive { } | |
extension Bool: CodablePrimitive { } | |
extension Double: CodablePrimitive { } | |
extension Float: CodablePrimitive { } | |
extension Int: CodablePrimitive { } | |
extension Int8: CodablePrimitive { } | |
extension Int16: CodablePrimitive { } | |
extension Int32: CodablePrimitive { } | |
extension Int64: CodablePrimitive { } | |
extension UInt: CodablePrimitive { } | |
extension UInt8: CodablePrimitive { } | |
extension UInt16: CodablePrimitive { } | |
extension UInt32: CodablePrimitive { } | |
extension UInt64: CodablePrimitive { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment