package babel

  1. Overview
  2. Docs

High level functions for working with callers in the style of Async.Rpc.One_way.dispatch'. There is no Babel.Caller.One_way'.dispatch_multi. Use the more general Babel.Caller.to_dispatch_fun.

type 'msg dispatch := 'msg -> unit Async_rpc_kernel.Rpc_result.t
val singleton : 'msg Async_rpc_kernel.Rpc.One_way.t -> 'msg dispatch t

Create a new caller supporting a single rpc.

val add : 'msg dispatch t -> rpc:'msg Async_rpc_kernel.Rpc.One_way.t -> 'msg dispatch t

Add support for dispatching another rpc. dispatch_multi will prefer this rpc over the ones the caller already supports.

val map_query : 'msg1 dispatch t -> f:('msg2 -> 'msg1) -> 'msg2 dispatch t

A specialization of map for the query type of a protocol.

OCaml

Innovation. Community. Security.