Skip to content
Snippets Groups Projects

Update Bindings

Merged Dariusz Rybicki requested to merge feature/update-bindings into development
2 files
+ 52
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 26
0
 
import Foundation
 
 
public struct IsReadyInfo: Equatable {
 
public init(isReady: Bool, howClose: Double) {
 
self.isReady = isReady
 
self.howClose = howClose
 
}
 
 
public var isReady: Bool
 
public var howClose: Double
 
}
 
 
extension IsReadyInfo: Codable {
 
enum CodingKeys: String, CodingKey {
 
case isReady = "IsReady"
 
case howClose = "HowClose"
 
}
 
 
public static func decode(_ data: Data) throws -> Self {
 
try JSONDecoder().decode(Self.self, from: data)
 
}
 
 
public func encode() throws -> Data {
 
try JSONEncoder().encode(self)
 
}
 
}
Loading