Skip to content
Snippets Groups Projects
Select Git revision
  • 4ae1a96adbe700a706f9d78eee1e015101f739df
  • main default protected
  • development
  • integration
  • v1.1.5
  • v1.1.4
  • v1.1.3
  • v1.1.2
  • v1.1.1
  • v1.1.0
  • v1.0.0
11 results

IdentityMaker.swift

Blame
  • IdentityMaker.swift 489 B
    import Bindings
    
    public struct IdentityMaker {
      public var make: () throws -> Data
    
      public func callAsFunction() throws -> Data {
        try make()
      }
    }
    
    extension IdentityMaker {
      public static func live(bindingsClient: BindingsClient) -> IdentityMaker {
        IdentityMaker {
          try bindingsClient.makeIdentity()
        }
      }
    }
    
    #if DEBUG
    extension IdentityMaker {
      public static let failing = IdentityMaker {
        struct NotImplemented: Error {}
        throw NotImplemented()
      }
    }
    #endif