Kappa_data_structures.Result_util
The subset of Cohttp.Code.status
we need
val write_message : Stdlib.Buffer.t -> message -> unit
val read_message : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> message
val print_message : Stdlib.Format.formatter -> message -> unit
val write_t :
(Stdlib.Buffer.t -> 'ok -> unit) ->
(Stdlib.Buffer.t -> 'error -> unit) ->
Stdlib.Buffer.t ->
('ok, 'error) t ->
unit
Output a JSON value of type t
.
val string_of_t :
(Stdlib.Buffer.t -> 'ok -> unit) ->
(Stdlib.Buffer.t -> 'error -> unit) ->
?len:int ->
('ok, 'error) t ->
string
Serialize a value of type t
into a JSON string.
val read_t :
(Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> 'ok) ->
(Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> 'error) ->
Yojson.Safe.lexer_state ->
Stdlib.Lexing.lexbuf ->
('ok, 'error) t
Input JSON data of type t
.
val t_of_string :
(Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> 'ok) ->
(Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> 'error) ->
string ->
('ok, 'error) t
Deserialize JSON data of type t
.
val fold : ok:('ok -> 'a) -> error:('error -> 'a) -> ('ok, 'error) t -> 'a