Module Rpc.Rpc
val create : name:string -> version:int -> bin_query:'query Bin_prot.Type_class.t -> bin_response:'response Bin_prot.Type_class.t -> ('query, 'response) tval name : (_, _) t -> stringthe same values as were passed to create.
val version : (_, _) t -> intval description : (_, _) t -> Description.tval bin_query : ('query, _) t -> 'query Bin_prot.Type_class.tval bin_response : (_, 'response) t -> 'response Bin_prot.Type_class.tval implement : ('query, 'response) t -> ('connection_state -> 'query -> 'response Async_kernel.Deferred.t) -> 'connection_state Implementation.tIf the function that implements the RPC raises, the implementer does not see the exception. Instead, it is sent as an error to the caller of the RPC, i.e. the process that called
dispatchor one of its alternatives.
val implement' : ('query, 'response) t -> ('connection_state -> 'query -> 'response) -> 'connection_state Implementation.timplement'is different fromimplementin that:1.
'responseis immediately serialized and scheduled for delivery to the RPC dispatcher.2. Less allocation happens, as none of the Async-related machinery is necessary.
implementalso tries to do 1 when possible, but it is guaranteed to happen withimplement'.
val dispatch' : ('query, 'response) t -> Connection.t -> 'query -> 'response Rpc_result.t Async_kernel.Deferred.tdispatch'exposesRpc_result.tas output. Passing it throughrpc_result_to_or_errorgives you the same result asdispatch
val rpc_result_to_or_error : ('query, 'response) t -> Connection.t -> 'response Rpc_result.t -> 'response Core_kernel.Or_error.tval dispatch : ('query, 'response) t -> Connection.t -> 'query -> 'response Core_kernel.Or_error.t Async_kernel.Deferred.tval dispatch_exn : ('query, 'response) t -> Connection.t -> 'query -> 'response Async_kernel.Deferred.t
module Expert : sig ... end