Module Sch

module Constraint = Sch_constraint
module Free = Sch_free
module Sig = Sch_sig
module File = Sch_file
type unknown_handling = Sch_dsl.unknown_handling =
  1. | Skip
  2. | Error_on_unknown
type 'o fieldk = 'o Sch_dsl.fieldk
type ('o, 'a) field = ('o, 'a) Sch_dsl.field = {
  1. name : string;
  2. doc : string;
  3. codec : 'a t;
  4. default : 'a option;
  5. get : 'o -> 'a;
  6. omit : 'a -> bool;
}
and 'a base_map = 'a Sch_dsl.base_map = {
  1. doc : string;
  2. constraint_ : 'a Constraint.t option;
}
and 'a union_case = 'a Sch_dsl.union_case =
  1. | Case : {
    1. tag : string;
    2. doc : string;
    3. codec : 'b t;
    4. inject : 'b -> 'a;
    5. project : 'a -> 'b option;
    } -> 'a union_case
and 'a t = 'a Sch_dsl.t =
  1. | Str : string base_map -> string t
  2. | Password : string base_map -> string t
  3. | Int : int base_map -> int t
  4. | Int32 : int32 base_map -> int32 t
  5. | Int64 : int64 base_map -> int64 t
  6. | Bool : {
    1. doc : string;
    } -> bool t
  7. | Float : float base_map -> float t
  8. | Double : float base_map -> float t
  9. | File : File.t t
  10. | Option : 'a t -> 'a option t
  11. | List : {
    1. doc : string;
    2. item : 'a t;
    3. constraint_ : 'a list Constraint.t option;
    } -> 'a list t
  12. | Map : {
    1. doc : string;
    2. item : 'a t;
    3. constraint_ : (string * 'a) list Constraint.t option;
    } -> (string * 'a) list t
  13. | Object : {
    1. kind : string;
    2. doc : string;
    3. unknown : unknown_handling;
    4. members : ('o fieldk, 'o) Free.t;
    } -> 'o t
  14. | Union : {
    1. doc : string;
    2. discriminator : string;
    3. cases : 'a union_case list;
    } -> 'a t
  15. | Rec : 'a t Stdlib.Lazy.t -> 'a t
  16. | Iso : {
    1. fwd : 'b -> ('a, string list) Stdlib.result;
    2. bwd : 'a -> 'b;
    3. repr : 'b t;
    } -> 'a t
val case_tags : 'a union_case list -> string list
val find_case_by_tag : Stdlib.String.t -> 'a union_case list -> 'a union_case option
type 'a projected_case = 'a Sch_dsl.projected_case =
  1. | Projected : {
    1. tag : string;
    2. codec : 'b t;
    3. payload : 'b;
    } -> 'a projected_case
val find_case_for_value : 'a -> 'a union_case list -> 'b projected_case option
type decode_error = Sch_dsl.decode_error = {
  1. path : string list;
  2. message : string;
}
val error : string -> decode_error
val errors : string list -> decode_error list
val in_field : string -> decode_error list -> decode_error list
val error_to_pair : decode_error -> string * string
val type_name : 'a t -> string
val format_name : 'a t -> string option
val doc : 'a t -> string
val is_object_codec : 'a t -> bool
val with_basemap : ?constraint_:'a Constraint.t -> ?doc:string -> 'a base_map -> 'a base_map
val with_ : ?constraint_:'a Constraint.t -> ?doc:string -> ?discriminator:string -> 'a t -> 'a t
val string : string t
val password : string t
val bool : bool t
val int : int t
val int32 : int32 t
val int64 : int64 t
val float : float t
val double : float t
val file : File.t t
val option : 'a t -> 'a option t
val rec' : 'a t Stdlib.Lazy.t -> 'a t
val custom : enc:('a -> 'b) -> dec:('b -> ('a, string list) Stdlib.result) -> 'b t -> 'a t
val list : ?doc:string -> ?constraint_:'a list Constraint.t -> 'a t -> 'a list t
val map : ?doc:string -> ?constraint_:(string * 'a) list Constraint.t -> 'a t -> (string * 'a) list t
module Object : sig ... end
module Validation : sig ... end
module Union : sig ... end
module Json : sig ... end