client-call-serverstreaming.swift 845 B

12345678910111213141516
  1. {{ access }} protocol {{ .|call:file,service,method }}: ClientCallServerStreaming {
  2. /// Call this to wait for a result. Blocking.
  3. func receive() throws -> {{ method|output }}
  4. /// Call this to wait for a result. Nonblocking.
  5. func receive(completion: @escaping ({{ method|output }}?, ClientError?) -> Void) throws
  6. }
  7. fileprivate final class {{ .|call:file,service,method }}Base: ClientCallServerStreamingBase<{{ method|input }}, {{ method|output }}>, {{ .|call:file,service,method }} {
  8. override class var method: String { return "{{ .|path:file,service,method }}" }
  9. }
  10. //-{% if generateTestStubs %}
  11. class {{ .|call:file,service,method }}TestStub: ClientCallServerStreamingTestStub<{{ method|output }}>, {{ .|call:file,service,method }} {
  12. override class var method: String { return "{{ .|path:file,service,method }}" }
  13. }
  14. //-{% endif %}