rpclib

A library to deal with RPCs in OCaml

Type declarations

type _ basic =
| Int : int basic
| Int32 : int32 basic
| Int64 : int64 basic
| Bool : bool basic
| Float : float basic
| String : string basic
| Char : char basic
type _ typ =
| Basic : 'a basic -> 'a typ
| DateTime : string typ
| Base64 : string typ
| Array : 'a typ -> 'a array typ
| List : 'a typ -> 'a list typ
| Dict : 'a basic * 'b typ -> ('a * 'b) list typ
| Unit : unit typ
| Option : 'a typ -> 'a option typ
| Tuple : 'a typ * 'b typ -> ('a * 'b) typ
| Tuple3 : 'a typ * 'b typ * 'c typ -> ('a * 'b * 'c) typ
| Tuple4 : 'a typ * 'b typ * 'c typ * 'd typ -> ('a * 'b * 'c * 'd) typ
| Struct : 'a structure -> 'a typ
| Variant : 'a variant -> 'a typ
| Abstract : 'a abstract -> 'a typ
and 'a def = {
name : string;
description : string list;
ty : 'a typ;
}
and boxed_def =
| BoxedDef : 'a def -> boxed_def
and ('a, 's) field = {
fname : string;
fdescription : string list;
fversion : Version.t option;
field : 'a typ;
fdefault : 'a option;
fget : 's -> 'a;
fset : 'a -> 's -> 's;
}
and 'a boxed_field =
| BoxedField : ( 'a, 's ) field -> 's boxed_field
and field_getter = {
field_get : 'a. string -> 'a typ -> ( 'a, Rresult.R.msg ) Result.t;
}
and 'a structure = {
sname : string;
fields : 'a boxed_field list;
version : Version.t option;
constructor : field_getter -> ( 'a, Rresult.R.msg ) Result.t;
}
and ('a, 's) tag = {
tname : string;
tdescription : string list;
tversion : Version.t option;
tcontents : 'a typ;
tpreview : 's -> 'a option;
treview : 'a -> 's;
}
and 'a boxed_tag =
| BoxedTag : ( 'a, 's ) tag -> 's boxed_tag
and tag_getter = {
tget : 'a. 'a typ -> ( 'a, Rresult.R.msg ) Result.t;
}
and 'a variant = {
vname : string;
variants : 'a boxed_tag list;
vdefault : 'a option;
vversion : Version.t option;
vconstructor : string -> tag_getter -> ( 'a, Rresult.R.msg ) Result.t;
}
and 'a abstract = {
aname : string;
test_data : 'a list;
rpc_of : 'a -> t;
of_rpc : t -> ( 'a, Rresult.R.msg ) Result.t;
}
val int : int def
val int32 : int32 def
val int64 : int64 def
val bool : bool def
val float : float def
val string : string def
val char : char def
val unit : unit def
val default_types : boxed_def list