package rpc

  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. | Array : 'a typ -> 'a array typ
  4. | List : 'a typ -> 'a list typ
  5. | Dict : 'a basic * 'b typ -> ('a * 'b) list typ
  6. | Unit : unit typ
  7. | Option : 'a typ -> 'a option typ
  8. | Tuple : 'a typ * 'b typ -> ('a * 'b) typ
  9. | Struct : 'a structure -> 'a typ
  10. | Variant : 'a variant -> '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. fget : 'a. string -> 'a typ -> ('a, Rresult.R.msg) Result.result;
}
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.result;
}
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.result;
}
and 'a variant = {
  1. variants : 'a boxed_tag list;
  2. vdefault : 'a option;
  3. vversion : Version.t option;
  4. vconstructor : string -> tag_getter -> ('a, Rresult.R.msg) Result.result;
}
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
OCaml

Innovation. Community. Security.