Topkg_codec
Topkg interprocess communication codec.
See Topkg.Private.Codec
for documentation.
val pp_error : Stdlib.Format.formatter -> error -> unit
exception Error of error
val v : kind:string -> enc:('a -> string) -> dec:(string -> 'a) -> 'a t
val kind : 'a t -> string
val enc : 'a t -> 'a -> string
val dec : 'a t -> string -> 'a
val dec_result : 'a t -> string -> 'a Topkg_result.result
val write : Topkg_fpath.t -> 'a t -> 'a -> unit Topkg_result.result
val read : Topkg_fpath.t -> 'a t -> 'a Topkg_result.result
val unit : unit t
val const : 'a -> 'a t
val bool : bool t
val int : int t
val string : string t
val result : ok:'a t -> error:'b t -> ('a, 'b) Topkg_result.r t
val msg : [ `Msg of string ] t
val result_error_msg : 'a t -> 'a Topkg_result.result t
val fpath : Topkg_fpath.t t
val cmd : Topkg_cmd.t t