Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type pb_encoding =
| Pbe_varint
| Pbe_zigzag
| Pbe_bits32
| Pbe_bits64
| Pbe_bytes
| Pbe_packed of pb_encoding
and pb_type =
| Pbt_bool
| Pbt_int
| Pbt_int32
| Pbt_int64
| Pbt_uint32
| Pbt_uint64
| Pbt_float
| Pbt_string
| Pbt_bytes
| Pbt_imm of Parsetree.core_type
| Pbt_variant of (int * string) list
| Pbt_nested of Parsetree.core_type list * Longident.t
| Pbt_poly of string
and pb_field = {
pbf_name : string;
pbf_extname : string;
pbf_path : string list;
pbf_key : int;
pbf_enc : pb_encoding;
pbf_type : pb_type;
pbf_kind : pb_kind;
pbf_default : Parsetree.expression option;
pbf_loc : Location.t;
}
type error =
| Pberr_attr_syntax of Location.t
* [ `Key | `Encoding | `Bare | `Default | `Packed ]
| Pberr_wrong_attr of Parsetree.attribute
| Pberr_no_key of Location.t
| Pberr_key_invalid of Location.t * int
| Pberr_key_duplicate of int * Location.t * Location.t
| Pberr_abstract of Parsetree.type_declaration
| Pberr_open of Parsetree.type_declaration
| Pberr_wrong_ty of Parsetree.core_type
| Pberr_wrong_tparm of Parsetree.core_type
| Pberr_no_conversion of Location.t * pb_type * pb_encoding
| Pberr_packed_bytes of Location.t
| Pberr_dumb_protoc of Location.t
| Pberr_ocaml_expr of Location.t
exception Error of error
val string_of_lident : Longident.t -> string
val string_of_pb_encoding : pb_encoding -> string
val pb_encoding_of_string : string -> pb_encoding option
val string_of_pb_type : pb_type -> string
val string_payload_kind_of_pb_encoding : pb_encoding -> string
val describe_error : error -> Location.error
val pb_key_of_attrs : Parsetree.attributes -> int option
val pb_encoding_of_attrs : Parsetree.attributes -> pb_encoding option
val bare_of_attrs : Parsetree.attributes -> bool
val default_of_attrs : Parsetree.attributes -> Parsetree.expression option
val packed_of_attrs : Parsetree.attributes -> bool
val fields_of_ptype :
Asttypes.label list ->
Parsetree.type_declaration ->
pb_field list
val empty_constructor_argument : Parsetree.constructor_declaration -> bool
val int64_constant_of_int : int -> Parsetree.constant
val derive_reader_bare :
string list ->
'a ->
Parsetree.type_declaration ->
Parsetree.value_binding option
val derive_reader :
string list ->
pb_field list ->
Parsetree.type_declaration ->
Parsetree.value_binding
val derive_writer_bare :
'a ->
Parsetree.type_declaration ->
Parsetree.value_binding option
val derive_writer :
pb_field list ->
Parsetree.type_declaration ->
Parsetree.value_binding
val str_of_type :
options:'a ->
path:Asttypes.label list ->
Parsetree.type_declaration ->
Parsetree.value_binding list
val has_bare : Parsetree.type_declaration -> bool
val sig_of_type :
options:'a ->
path:'b ->
Parsetree.type_declaration ->
Parsetree.signature_item list
module LongidentSet : sig ... end
val write_protoc :
fmt:Format.formatter ->
path:Asttypes.label list ->
?import:string list ->
Parsetree.type_declaration ->
unit
val protoc_files : (string, Format.formatter) Hashtbl.t
val parse_options :
options:(string * Parsetree.expression) list ->
path:Asttypes.label list ->
Parsetree.type_declaration list ->
unit