module Ty = Resto.Internal.Ty
type !'a arg = 'a Resto.Internal.arg = {
id : 'a Ty.id;
destruct : string -> ('a, string) Stdlib.result;
construct : 'a -> string;
descr : Resto.Arg.descr;
}
val from_arg : 'a arg -> 'a Resto.Arg.t
val to_arg : 'a Resto.Arg.t -> 'a arg
type (!'b, !'c) path = ('b, 'c) Resto.Internal.path =
| Root : ('rkey, 'rkey) path
| Static : ('rkey0, 'key) path * string -> ('rkey0, 'key) path
| Dynamic : ('rkey1, 'key0) path * 'a arg -> ('rkey1, 'key0 * 'a) path
| DynamicTail : ('rkey2, 'key1) path * 'a0 arg -> ('rkey2, 'key1 * 'a0 list) path
val from_path : ('a, 'b) path -> ('a, 'b) Resto.Path.t
val to_path : ('a, 'b) Resto.Path.t -> ('a, 'b) path
type !'a query = 'a Resto.Internal.query =
| Fields : ('a0, 'b) query_fields * 'b -> 'a0 query
and (!'a, !'b) query_field = ('a, 'b) Resto.Internal.query_field =
| Single : {
name : string;
description : string option;
ty : 'b0 arg;
default : 'b0;
get : 'a0 -> 'b0;
} -> ('a0, 'b0) query_field
| Opt : {
name : string;
description : string option;
ty : 'b1 arg;
get : 'a1 -> 'b1 option;
} -> ('a1, 'b1 option) query_field
| Flag : {
name : string;
description : string option;
get : 'a2 -> bool;
} -> ('a2, bool) query_field
| Multi : {
name : string;
description : string option;
ty : 'b2 arg;
get : 'a3 -> 'b2 list;
} -> ('a3, 'b2 list) query_field
val from_query : 'a query -> 'a Resto.Query.t
val to_query : 'a Resto.Query.t -> 'a query
val field_description : ('a, 'b) query_field -> string option
val field_kind : ('a, 'b) query_field -> Resto.Description.query_kind
type (!'query, !'input, !'output, !'error) types =
('query, 'input, 'output, 'error)
Resto.MakeService(Mavryk_rpc.Encoding).Internal.types =
{
query : 'query Resto.Query.t;
input : 'input input;
output : 'output Mavryk_rpc.Encoding.t;
error : 'error Mavryk_rpc.Encoding.t;
}
type (!+'a, !'prefix, !'params, !'query, !'input, !'output, !'error) iservice =
('a, 'prefix, 'params, 'query, 'input, 'output, 'error)
Resto.MakeService(Mavryk_rpc.Encoding).Internal.iservice =
{
description : string option;
meth : 'a;
path : ('prefix, 'params) path;
types : ('query, 'input, 'output, 'error) types;
} constraint 'a = [< Resto.meth ]
type (!'a, !'b) eq =
('a, 'b) Resto.MakeService(Mavryk_rpc.Encoding).Internal.eq =
| Eq : (('query, 'input, 'output, 'error) types,
('query, 'input, 'output, 'error) types)
eq
val eq :
('query1, 'input1, 'output1, 'error1) types ->
('query2, 'input2, 'output2, 'error2) types ->
(('query1, 'input1, 'output1, 'error1) types,
('query2, 'input2, 'output2, 'error2) types)
eq
val from_service :
([< Resto.meth ] as 'a, 'prefix, 'params, 'query, 'input, 'output, 'error)
iservice ->
('a, 'prefix, 'params, 'query, 'input, 'output, 'error) service
val to_service :
([< Resto.meth ] as 'a, 'prefix, 'params, 'query, 'input, 'output, 'error)
service ->
('a, 'prefix, 'params, 'query, 'input, 'output, 'error) iservice