package rpclib

  1. Overview
  2. Docs

Type declarations

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