def batch.one

ezmcp@0.1.0.0 · src/server.bend:300

import ezmcp@0.1.0.0/src/server.bend as Server
import Base
import ezmcp@0.1.0.0/src/rpc.bend as Rpc

300# what a server does with one element of a batch: what it does with the
301# message alone, except that initialize is an invalid request
302# (2025-03-26/basic/lifecycle#initialization)
303def batch.one(srv: Server, +msg: Rpc.Msg) -> Act:
304  match msg:
305    case Rpc.Ask{+id, +m, params}:
306      batch.init(id, msg, String.eq(m, "initialize"), srv)
307    case other:
308      handle(srv, other)

Uses (6)

Used by (1)