Caller.Pipe_rpc_exnSourceHigh level functions for working with callers in the style of Async.Rpc.Pipe_rpc.dispatch_exn.
type ('q, 'r) dispatch :=
'q ->
('r Async_kernel.Pipe.Reader.t * Async_rpc_kernel.Rpc.Pipe_rpc.Metadata.t)
Async_kernel.Deferred.tval dispatch_multi :
?metadata:Async_rpc_kernel.Rpc_metadata.t ->
('q, 'r) dispatch t ->
Async_rpc_kernel.Versioned_rpc.Connection_with_menu.t ->
('q, 'r) dispatchDetermine which supported dispatch strategy to use and invoke the chosen rpcs. To unsubscribe, you can close the pipe.
Create a new caller supporting a single rpc.
val add :
('q, 'r) dispatch t ->
rpc:('q, 'r, 'e) Async_rpc_kernel.Rpc.Pipe_rpc.t ->
('q, 'r) dispatch tAdd support for dispatching another rpc. dispatch_multi will prefer this rpc over the ones the caller already supports.
A specialization of map for the query type of a protocol.
A specialization of map for the response type of a protocol.
Sometimes, Caller.Pipe_rpc_exn.map_response is not sufficient. For example, sometimes it might not be possible to convert the response to the desired type, in which case it may be appropriate to drop the value from the pipe entirely. For such cases, use Caller.map_response instead. It gives you access to the pipe itself, not just the values inside it, allowing you to use something like Pipe.filter_map.