struct MyStruct {
let x : Int
let y : Bool
let z : Double
}
let originalValue = MyStruct(x: 3, y: true, z: 1.3)
let data = valueToData(originalValue)
// Save data to CoreData
var s = MyStruct(x: 0, y: false, z: 0) // Empty Value
dataToValue(&s, data: data) // Initialize with data
// s is MyStruct(x: 3, y: true, z: 1.3)