Rpc.server_stream: def of bendonnect-rpc@0.1.0.0 Import: import bendonnect-rpc@0.1.0.0/src/transport/rpc.bend as Rpc Lines 140-150 of bendonnect-rpc@0.1.0.0/src/transport/rpc.bend: https://jend.leeeet.dev/read.txt?path=bendonnect-rpc@0.1.0.0/src/transport/rpc.bend&start_line=140&end_line=150 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes import bendonnect-rpc@0.1.0.0/src/error.bend as E import bendonnect-rpc@0.1.0.0/src/protocol.bend as P import bendonnect-rpc@0.1.0.0/src/transport/server.bend as Srv # Serves a server-streaming method: impl gets the request and an Out to Rpc.send on, and returns # the final Out with Done (stream ends cleanly) or Fail (error in the EndStream message). def server_stream(~Req: Data, ~dec: @+codec: P.Codec -> Bytes.Bytes -> Result<&1, &1, E.Error, Req>, ~impl: Ctx -> Req -> Out -> IO(Out & Result<&1, &1, E.Error, Unit>), call: Srv.Call) -> IO(Srv.Reply): Srv.Call{procedure, kind, +codec, headers, timeout_ms, messages} = call match codec: case P.Custom{name}: reply_io(no_custom(name)) case P.Json{}: ss.one(~Req, ~dec, ~impl, procedure, P.Json{}, headers, messages) case P.Proto{}: ss.one(~Req, ~dec, ~impl, procedure, P.Proto{}, headers, messages) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/error.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/protocol.bend&name=Codec https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/transport/rpc.bend&name=Ctx https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/transport/rpc.bend&name=Out https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/transport/rpc.bend&name=no_custom https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/transport/rpc.bend&name=reply_io https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/transport/rpc.bend&name=ss.one https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/transport/server.bend&name=Call https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/transport/server.bend&name=Reply