package rpc

  1. Overview
  2. Docs

Value

type t =
  1. | Int of int64
  2. | Int32 of int32
  3. | Bool of bool
  4. | Float of float
  5. | String of string
  6. | DateTime of string
  7. | Enum of t list
  8. | Dict of (string * t) list
  9. | Null
val to_string : t -> string
module Version : sig ... end
module Types : sig ... end

Basic constructors

val rpc_of_int64 : int64 -> t
val rpc_of_int32 : int32 -> t
val rpc_of_int : int -> t
val rpc_of_bool : bool -> t
val rpc_of_float : float -> t
val rpc_of_string : string -> t
val rpc_of_dateTime : string -> t
val rpc_of_unit : unit -> t
val rpc_of_char : char -> t
val int64_of_rpc : t -> int64
val int32_of_rpc : t -> int32
val int_of_rpc : t -> int
val bool_of_rpc : t -> bool
val float_of_rpc : t -> float
val string_of_rpc : t -> string
val dateTime_of_rpc : t -> string
val t_of_rpc : t -> t
val rpc_of_t : t -> t
val char_of_rpc : t -> char
val unit_of_rpc : t -> unit
module ResultUnmarshallers : sig ... end

Calls

type callback = string list -> t -> unit
type call = {
  1. name : string;
  2. params : t list;
}
val call : string -> t list -> call
val string_of_call : call -> string

Responses

type response = {
  1. success : bool;
  2. contents : t;
}
val string_of_response : response -> string
val success : t -> response
val failure : t -> response

Run-time errors

exception Runtime_error of string * t
exception Runtime_exception of string * string
val set_debug : bool -> unit

Debug options

val get_debug : unit -> bool
val lowerfn : t -> t

Helper

val struct_extend : t -> t -> t

struct_extend rpc1 rpc2 first checks that rpc1 and rpc2 are both * dictionaries. If this is the case then struct_extend will create a new * Rpc.t which contains all key-value pairs from rpc1, as well as all * key-value pairs from rpc2 for which the key does not exist in rpc1.

OCaml

Innovation. Community. Security.