Sesame-iOS/Sesame/API/Extensions/Data+Coding.swift
2023-12-20 09:25:53 +01:00

12 lines
184 B
Swift

import Foundation
extension Data {
init<T>(from value: T) {
var target = value
self = Swift.withUnsafeBytes(of: &target) {
Data($0)
}
}
}