sig
type raw_tws = string
module Val_type :
sig
type 'a t
val create :
('a -> Tws_prot.raw_tws) ->
(Tws_prot.raw_tws -> 'a) -> 'a Tws_prot.Val_type.t
end
module Pickler :
sig
module Spec :
sig
type 'a t
val empty : unit -> [ `Args ] Tws_prot.Pickler.Spec.t
val wrap :
'a Tws_prot.Pickler.Spec.t ->
('b -> 'a) -> 'b Tws_prot.Pickler.Spec.t
val ( ++ ) :
'a Tws_prot.Pickler.Spec.t ->
'b Tws_prot.Pickler.Spec.t -> ('a * 'b) Tws_prot.Pickler.Spec.t
val ( $ ) : 'a -> 'b -> 'a * 'b
val unit : unit Tws_prot.Val_type.t
val string : string Tws_prot.Val_type.t
val int : int Tws_prot.Val_type.t
val int64 : int64 Tws_prot.Val_type.t
val float : float Tws_prot.Val_type.t
val bool : bool Tws_prot.Val_type.t
val bools : bool Tws_prot.Val_type.t
val stamp : Core.Std.Time.t Tws_prot.Val_type.t
val time : Core.Std.Time.t Tws_prot.Val_type.t
val date : Core.Std.Date.t Tws_prot.Val_type.t
val zone : Core.Std.Time.Zone.t Tws_prot.Val_type.t
type 'a value
val sequence :
?sep:char ->
'a Tws_prot.Val_type.t -> 'a list Tws_prot.Pickler.Spec.value
val required :
'a Tws_prot.Val_type.t -> 'a Tws_prot.Pickler.Spec.value
val optional :
?default_on_none:Tws_prot.raw_tws ->
'a Tws_prot.Val_type.t -> 'a option Tws_prot.Pickler.Spec.value
val skipped_if_none :
'a Tws_prot.Val_type.t -> 'a option Tws_prot.Pickler.Spec.value
val skipped : 'a Tws_prot.Pickler.Spec.value
val tws_data : Tws_prot.raw_tws Tws_prot.Pickler.Spec.value
val value :
'a Tws_prot.Pickler.Spec.value -> 'a Tws_prot.Pickler.Spec.t
val fields_value :
'a Tws_prot.Pickler.Spec.value ->
'accum Tws_prot.Pickler.Spec.t ->
('b, 'c) Core.Std.Field.t ->
('accum * 'a) Tws_prot.Pickler.Spec.t
end
type 'a t
val create :
?buf_size:int ->
?name:string -> 'a Tws_prot.Pickler.Spec.t -> 'a Tws_prot.Pickler.t
val run : 'a Tws_prot.Pickler.t -> 'a -> Tws_prot.raw_tws
end
module Unpickler :
sig
module Spec :
sig
type ('conv_in, 'conv_out) t
val ( ++ ) :
('c1, 'c2) Tws_prot.Unpickler.Spec.t ->
('c2, 'c3) Tws_prot.Unpickler.Spec.t ->
('c1, 'c3) Tws_prot.Unpickler.Spec.t
val step : ('c1 -> 'c2) -> ('c1, 'c2) Tws_prot.Unpickler.Spec.t
val empty : unit -> ('c, 'c) Tws_prot.Unpickler.Spec.t
val unit : unit Tws_prot.Val_type.t
val string : string Tws_prot.Val_type.t
val int : int Tws_prot.Val_type.t
val int64 : int64 Tws_prot.Val_type.t
val float : float Tws_prot.Val_type.t
val bool : bool Tws_prot.Val_type.t
val bools : bool Tws_prot.Val_type.t
val stamp : Core.Std.Time.t Tws_prot.Val_type.t
val time : Core.Std.Time.t Tws_prot.Val_type.t
val date : Core.Std.Date.t Tws_prot.Val_type.t
val zone : Core.Std.Time.Zone.t Tws_prot.Val_type.t
type 'a value
val sequence :
?sep:char ->
'a Tws_prot.Val_type.t -> 'a list Tws_prot.Unpickler.Spec.value
val required :
'a Tws_prot.Val_type.t -> 'a Tws_prot.Unpickler.Spec.value
val optional :
?none_on_default:Tws_prot.raw_tws ->
'a Tws_prot.Val_type.t -> 'a option Tws_prot.Unpickler.Spec.value
val optional_with_default :
default:'a ->
'a Tws_prot.Val_type.t -> 'a Tws_prot.Unpickler.Spec.value
val value :
'a Tws_prot.Unpickler.Spec.value ->
name:string -> ('a -> 'c, 'c) Tws_prot.Unpickler.Spec.t
val capture_remaining_message :
(Tws_prot.raw_tws Core.Std.Queue.t -> 'c, 'c)
Tws_prot.Unpickler.Spec.t
val fields_value :
'a Tws_prot.Unpickler.Spec.value ->
('c1, 'a -> 'c2) Tws_prot.Unpickler.Spec.t ->
('b, 'c) Fieldslib.Field.t ->
('c1, 'c2) Tws_prot.Unpickler.Spec.t
end
type 'a t
val create :
?name:string ->
('conv, 'a) Tws_prot.Unpickler.Spec.t ->
'conv -> 'a Tws_prot.Unpickler.t
val map :
'a Tws_prot.Unpickler.t -> f:('a -> 'b) -> 'b Tws_prot.Unpickler.t
val const : 'a -> 'a Tws_prot.Unpickler.t
val run :
'a Tws_prot.Unpickler.t ->
Tws_prot.raw_tws Core.Std.Queue.t -> 'a Core.Std.Or_error.t
val run_exn :
'a Tws_prot.Unpickler.t -> Tws_prot.raw_tws Core.Std.Queue.t -> 'a
end
val raw_tws_of_sexp : Sexplib.Sexp.t -> Tws_prot.raw_tws
val sexp_of_raw_tws : Tws_prot.raw_tws -> Sexplib.Sexp.t
end