Library
Module
Module type
Parameter
Class
Class type
Client generator similar to Idl.GenClient
that uses Async
.
include Idl.RPC
with type implementation = unit
and type 'a res = async_rpcfn -> 'a
and type ('a, 'b) comp = ('a, 'b) Result.result M.async
The implementation is dependent on the module, and represents the 'result' of the entire module. For example, in the Server module, the `implementation` is the server function, with type
Rpc.call -> Rpc.response.
For the Client module, the individual declarations are used to perform the RPCs, and the 'implementation' type is simply unit.
val implement : Idl.Interface.description -> implementation
To actually construct the implementation, an interface description must be provided
type 'a res = async_rpcfn -> 'a
'a res is the result type of declaring a function. For example, the Client module, given an (int -> int -> int) fn, will return a function of type 'a - in this case, (int -> int -> int)
type ('a, 'b) comp = ('a, 'b) Result.result M.async
This is for inserting a type in between the function application and its result. For example, this could be an Lwt.t, meaning that the result of a function application is a thread
val (@->) : 'a Idl.Param.t -> 'b fn -> ('a -> 'b) fn
This infix operator is for constructing function types
val returning : 'a Idl.Param.t -> 'b Idl.Error.t -> ('a, 'b) comp fn
This defines the return type of an RPC