Rpc.run_req: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/rpc.bend as Rpc Lines 38-43 of cswap-bend-cli@0.1.0.0/rpc.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/rpc.bend&start_line=38&end_line=43 import Base import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd import cswap-bend-cli@0.1.0.0/exec.bend as Exec import cswap-bend-cli@0.1.0.0/fmt/out.bend as O import cswap-bend-cli@0.1.0.0/rpcmsg.bend as M def run_req(+f: O.Fmt, r: M.Req) -> IO(String): match r: case M.ReqOk{id, argv}: IO.bind(Cmd.Out, String, Exec.exec_line(argv, Some{O.FJson{}}), o => IO.pure(String, render(f, M.response(id, o)))) case M.ReqBad{id, code, msg}: IO.pure(String, render(f, M.err_resp(id, code, msg, 2))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/cmd.bend&name=Out https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/exec.bend&name=exec_line https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/out.bend&name=Fmt https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/rpc.bend&name=render https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/rpcmsg.bend&name=Req https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/rpcmsg.bend&name=err_resp https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/rpcmsg.bend&name=response