Skip to content
Snippets Groups Projects

Update Bindings

Merged Dariusz Rybicki requested to merge feature/update-bindings into development
1 file
+ 31
0
Compare changes
  • Side-by-side
  • Inline
 
import Bindings
 
import XCTestDynamicOverlay
 
 
public struct StoreReceptionIdentity {
 
public var run: (String, Data, Int) throws -> Bool
 
 
public func callAsFunction(
 
key: String,
 
identity: Data,
 
cmixId: Int
 
) throws -> Bool {
 
try run(key, identity, cmixId)
 
}
 
}
 
 
extension StoreReceptionIdentity {
 
public static let live = StoreReceptionIdentity { key, identity, cmixId in
 
var error: NSError?
 
let result = BindingsStoreReceptionIdentity(key, identity, cmixId, &error)
 
if let error = error {
 
throw error
 
}
 
return result
 
}
 
}
 
 
extension StoreReceptionIdentity {
 
public static let unimplemented = StoreReceptionIdentity(
 
run: XCTUnimplemented("\(Self.self)")
 
)
 
}
Loading