Skip to content
Snippets Groups Projects
Commit 4b4bddbc authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add StoreReceptionIdentity functor

parent b7b43996
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!18Update Bindings
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)")
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment