Module Transom_runtime.ProtocolSource

Sourcetype id = int
Sourcetype call = {
  1. id : id;
  2. method_ : string;
  3. params : Yojson.Safe.t;
}
Sourcetype cancel = {
  1. id : id;
}
Sourcetype incoming =
  1. | Call of call
  2. | Cancel of cancel
Sourcetype ok = {
  1. id : id;
  2. result : Yojson.Safe.t;
}
Sourcetype err = {
  1. id : id option;
  2. error : Error.t;
}
Sourcetype event = {
  1. id : id;
  2. event : Yojson.Safe.t;
}
Sourcetype outgoing =
  1. | Out_ok of ok
  2. | Out_err of err
  3. | Out_event of event
Sourceval assoc : [> `Assoc of 'a ] -> ('a, string) result
Sourceval int_of_yojson : string -> [> `Int of int | `Intlit of string ] -> (int, string) result
Sourceval id_of_yojson : [> `Int of int | `Intlit of string ] -> (int, string) result
Sourceval id_opt_of_yojson : [> `Int of int | `Intlit of string | `Null ] -> (int option, string) result
Sourceval string_of_yojson : string -> [> `String of 'a ] -> ('a, string) result
Sourceval field : string -> (string * 'a) list -> ('a, string) result
Sourceval optional_id : [> `Assoc of (string * [> `Int of int | `Intlit of string | `Null ]) list ] -> int option
Sourceval incoming_to_yojson : incoming -> [> `Assoc of (string * Yojson.Safe.t) list ]
Sourceval incoming_of_yojson : [> `Assoc of (string * Yojson.Safe.t) list ] -> (incoming, string) result
Sourceval outgoing_to_yojson : outgoing -> [> `Assoc of (string * Yojson.Safe.t) list ]
Sourceval outgoing_of_yojson : [> `Assoc of (string * Yojson.Safe.t) list ] -> (outgoing, string) result