Rpc.decide.method: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/rpc.bend as Rpc Lines 124-138 of ezmcp@0.1.0.0/src/rpc.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/rpc.bend&start_line=124&end_line=138 import Base import emerging-ezjson@1.2.0.0/main.bend as Json import emerging-ezjson@1.2.0.0/src/value.bend as Value # a message with a method: a request when it has an id, which must be a # valid one; a notification when it has none def decide.method( has_id: Bool, id_ok: Bool, id: Value.Json, method: String, params: Value.Json ) -> Msg: match has_id: case False{}: Tell{method, params} case True{}: Bool.pick(Msg, id_ok, Ask{id, method, params}, Junk{Json.null(), "Invalid Request: id must be a string or an integer"}) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=null https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=Msg