module Client_msg:sig
..end
module Control:sig
..end
type ('name, 'data)
t =
| |
Control of |
| |
Data of |
val t_of_sexp__ : (Sexplib.Sexp.t -> 'a) ->
(Sexplib.Sexp.t -> 'b) ->
Sexplib.Sexp.t -> ('a, 'b) t
val t_of_sexp : (Sexplib.Sexp.t -> 'name) ->
(Sexplib.Sexp.t -> 'data) ->
Sexplib.Sexp.t -> ('name, 'data) t
val sexp_of_t : ('name -> Sexplib.Sexp.t) ->
('data -> Sexplib.Sexp.t) ->
('name, 'data) t -> Sexplib.Sexp.t
val bin_size_t : ('a -> int) ->
('b -> int) -> ('a, 'b) t -> int
val bin_write_t_ : (Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr ->
'a -> Bin_prot.Unsafe_common.sptr) ->
(Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr ->
'b -> Bin_prot.Unsafe_common.sptr) ->
Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr ->
('a, 'b) t ->
Bin_prot.Unsafe_common.sptr
val bin_write_t : (Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr ->
'name -> Bin_prot.Unsafe_common.sptr) ->
(Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr ->
'data -> Bin_prot.Unsafe_common.sptr) ->
Bin_prot.Common.buf ->
pos:Bin_prot.Common.pos ->
('name, 'data) t ->
Bin_prot.Common.pos
val bin_writer_t : 'a Bin_prot.Type_class.writer ->
'b Bin_prot.Type_class.writer ->
('a, 'b) t Bin_prot.Type_class.writer
val bin_read_t__ : 'a -> 'b -> 'c -> 'd -> 'e -> 'f
val bin_read_t_ : (Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr -> 'a) ->
(Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr -> 'b) ->
Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr ->
('a, 'b) t
val bin_read_t : (Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr -> 'name) ->
(Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr -> 'data) ->
Bin_prot.Common.buf ->
pos_ref:Bin_prot.Common.pos Pervasives.ref ->
('name, 'data) t
val bin_reader_t : 'a Bin_prot.Type_class.reader ->
'b Bin_prot.Type_class.reader ->
('a, 'b) t Bin_prot.Type_class.reader
val bin_t : 'a Bin_prot.Type_class.t ->
'b Bin_prot.Type_class.t ->
('a, 'b) t Bin_prot.Type_class.t
lookup_marshal_fun v
This function takes a version v
, and returns a
function that will downgrade (if necessary) the current version to v
and
then write it to a bigsubstring. It is perfectly fine if one message
becomes zero or more messages as a result of downgrading, this is why the
marshal fun returns a list. The contents of these buffers will be copied
immediatly, so it is safe to reuse the same bigstring for multiple
marshals.lookup_unmarshal_fun v
This function takes a version v
, and returns a
function that unmarshals a message and upgrades it, returning zero or more
messages as a result of the upgrade. The bigsubstring is only guaranteed
to contain valid data until the unmarshal function returns, after which it
may be overwritten immediatly.
If you don't care about modes, just use Dont_care_about_mode.