package ppx_deriving_protobuf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type pb_encoding =
  1. | Pbe_varint
  2. | Pbe_zigzag
  3. | Pbe_bits32
  4. | Pbe_bits64
  5. | Pbe_bytes
  6. | Pbe_packed of pb_encoding
and pb_type =
  1. | Pbt_bool
  2. | Pbt_int
  3. | Pbt_int32
  4. | Pbt_int64
  5. | Pbt_uint32
  6. | Pbt_uint64
  7. | Pbt_float
  8. | Pbt_string
  9. | Pbt_bytes
  10. | Pbt_imm of Ppxlib.Parsetree.core_type
  11. | Pbt_variant of (int * string) list
  12. | Pbt_nested of Ppxlib.Parsetree.core_type list * Ppxlib.Longident.t
  13. | Pbt_poly of string
and pb_kind =
  1. | Pbk_required
  2. | Pbk_optional
  3. | Pbk_repeated
and pb_field = {
  1. pbf_name : string;
  2. pbf_extname : string;
  3. pbf_path : string list;
  4. pbf_key : int;
  5. pbf_enc : pb_encoding;
  6. pbf_type : pb_type;
  7. pbf_kind : pb_kind;
  8. pbf_default : Ppxlib.Parsetree.expression option;
  9. pbf_loc : Ppxlib.Location.t;
}
type error =
  1. | Pberr_attr_syntax of Ppxlib.Location.t * [ `Key | `Encoding | `Bare | `Default | `Packed ]
  2. | Pberr_wrong_attr of Ppxlib.Parsetree.attribute
  3. | Pberr_no_key of Ppxlib.Location.t
  4. | Pberr_key_invalid of Ppxlib.Location.t * int
  5. | Pberr_key_duplicate of int * Ppxlib.Location.t * Ppxlib.Location.t
  6. | Pberr_abstract of Ppxlib.Parsetree.type_declaration
  7. | Pberr_open of Ppxlib.Parsetree.type_declaration
  8. | Pberr_wrong_ty of Ppxlib.Parsetree.core_type
  9. | Pberr_wrong_tparm of Ppxlib.Parsetree.core_type
  10. | Pberr_no_conversion of Ppxlib.Location.t * pb_type * pb_encoding
  11. | Pberr_packed_bytes of Ppxlib.Location.t
  12. | Pberr_dumb_protoc of Ppxlib.Location.t
  13. | Pberr_ocaml_expr of Ppxlib.Location.t
exception Error of error
val filter_map : ('a -> 'b option) -> 'a list -> 'b list
val string_of_lident : Ppxlib.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 -> 'a
val deriver : string
val pb_key_of_attrs : Ppxlib.attributes -> int option
val pb_encoding_of_attrs : Ppxlib.attributes -> pb_encoding option
val bare_of_attrs : Ppxlib.attributes -> bool
val default_of_attrs : Ppxlib.attributes -> Ppxlib_ast.Ast.expression option
val packed_of_attrs : Ppxlib.attributes -> bool
val fields_of_ptype : string list -> Ppxlib.Parsetree.type_declaration -> pb_field list
val empty_constructor_argument : Ppxlib.Parsetree.constructor_declaration -> bool
val int64_constant_of_int : int -> Ppxlib.Parsetree.constant
val derive_reader_bare : string list -> 'a -> Ppxlib.type_declaration -> Astlib.Ast_500.Parsetree.value_binding option
val derive_writer_bare : 'a -> Ppxlib.type_declaration -> Astlib.Ast_500.Parsetree.value_binding option
val str_of_type : options:'a -> path:string list -> Ppxlib.Parsetree.type_declaration -> Astlib.Ast_500.Parsetree.value_binding list
val has_bare : Ppxlib.Parsetree.type_declaration -> bool
val sig_of_type : options:'a -> path:'b -> Ppxlib.Parsetree.type_declaration -> Astlib.Ast_500.Parsetree.signature_item list
module LongidentSet : sig ... end
val write_protoc : fmt:Format.formatter -> path:string list -> ?import:string list -> Ppxlib.Parsetree.type_declaration -> unit
val protoc_files : (string, Format.formatter) Hashtbl.t
val parse_options : options:(string * Ppxlib_ast.Ast.expression) list -> path:string list -> Ppxlib.Parsetree.type_declaration list -> unit