package resto

  1. Overview
  2. Docs
module Ty : sig ... end
type 'a arg = {
  1. id : 'a Ty.id;
  2. destruct : string -> ('a, string) result;
  3. construct : 'a -> string;
  4. descr : Arg.descr;
}
val from_arg : 'a arg -> 'a Arg.t
val to_arg : 'a Arg.t -> 'a arg
type (_, _) path =
  1. | Root : ('rkey, 'rkey) path
  2. | Static : ('rkey, 'key) path * string -> ('rkey, 'key) path
  3. | Dynamic : ('rkey, 'key) path * 'a arg -> ('rkey, 'key * 'a) path
  4. | DynamicTail : ('rkey, 'key) path * 'a arg -> ('rkey, 'key * 'a list) path
val from_path : ('a, 'b) path -> ('a, 'b) Path.t
val to_path : ('a, 'b) Path.t -> ('a, 'b) path
type 'a query =
  1. | Fields : ('a, 'b) query_fields * 'b -> 'a query
and ('a, 'b) query_fields =
  1. | F0 : ('a, 'a) query_fields
  2. | F1 : ('a, 'b) query_field * ('a, 'c) query_fields -> ('a, 'b -> 'c) query_fields
and ('a, 'b) query_field =
  1. | Single : {
    1. name : string;
    2. description : string option;
    3. ty : 'b arg;
    4. default : 'b;
    5. get : 'a -> 'b;
    } -> ('a, 'b) query_field
  2. | Opt : {
    1. name : string;
    2. description : string option;
    3. ty : 'b arg;
    4. get : 'a -> 'b option;
    } -> ('a, 'b option) query_field
  3. | Flag : {
    1. name : string;
    2. description : string option;
    3. get : 'a -> bool;
    } -> ('a, bool) query_field
  4. | Multi : {
    1. name : string;
    2. description : string option;
    3. ty : 'b arg;
    4. get : 'a -> 'b list;
    } -> ('a, 'b list) query_field
val from_query : 'a query -> 'a Query.t
val to_query : 'a Query.t -> 'a query
val field_name : ('a, 'b) query_field -> string
val field_description : ('a, 'b) query_field -> string option
val field_kind : ('a, 'b) query_field -> Description.query_kind
type ('query, 'input, 'output, 'error) types = {
  1. query : 'query Query.t;
  2. input : 'input input;
  3. output : 'output Encoding.t;
  4. error : 'error Encoding.t;
}
type (+'meth, 'prefix, 'params, 'query, 'input, 'output, 'error) iservice = {
  1. description : string option;
  2. meth : 'meth;
  3. path : ('prefix, 'params) path;
  4. types : ('query, 'input, 'output, 'error) types;
} constraint 'meth = [< meth ]
exception Not_equal
type (_, _) eq =
  1. | 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 : ('meth, 'prefix, 'params, 'query, 'input, 'output, 'error) iservice -> ('meth, 'prefix, 'params, 'query, 'input, 'output, 'error) service
val to_service : ('meth, 'prefix, 'params, 'query, 'input, 'output, 'error) service -> ('meth, 'prefix, 'params, 'query, 'input, 'output, 'error) iservice
OCaml

Innovation. Community. Security.