package ocaml-protoc
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=33904442e655b259e18386be2ccc335bfaf69e5ecaf02085b6aa327f5c82c365
    
    
  sha512=d39b027d6b96f14c08789095990abbdad918ae54eba4ab094bef51931ea6f60c89c8e33cd35c0263c7d54e684deeb53c3272985cecb85d83bf546f3a1cd58af0
    
    
  doc/ocaml-protoc.compiler-lib/Ocaml_protoc_compiler_lib/Pb_codegen_util/index.html
Module Ocaml_protoc_compiler_lib.Pb_codegen_utilSource
Common utility functions for OCaml code generation
let_decl_of_and and_ returns the function declaration "let" (when ?and_ is None), "and" otherwise.
val string_of_record_field_type : 
  ?module_prefix:string ->
  Pb_codegen_ocaml_type.record_field_type ->
  stringval string_of_field_type : 
  ?for_pp:bool ->
  ?module_prefix:string ->
  Pb_codegen_ocaml_type.field_type ->
  stringval function_name_of_user_defined : 
  function_prefix:string ->
  Pb_codegen_ocaml_type.user_defined_type ->
  stringfunction_name_of_user_defined prefix user_defined returns the function name of the form `(module'.'?)<prefix>_(type_name)`.
This pattern is common since a generated function for a type (encode/decode/to_string) will call the same generated function for each user defined field type.
Name of the module type for this service (client)
Name of the module type for this service (server)
Name of the function for this RPC
caml_file_name_of_proto_file_name filename returns the OCaml file name from the protobuf file name
mutable_record_name record_name returns the type name of the `mutable` type name. We use mutable types when decoding for better performance, this function encapsulate the nameing convention for this additional type.
val string_of_payload_kind : 
  ?capitalize:unit ->
  Pb_codegen_ocaml_type.payload_kind ->
  bool ->
  stringstring_of_payload_kind ~capitalize:() payload_kind packed will return the string corresponding to the payload kind.
this function transforms a `lower_case_like_this` into an camlCaseLikeThis
this function transform an OCaml constructuror `Like_this` into a 'likeThis' case
collect_modules_of_types ocaml_types return the list of all the modules that the ocaml_types depends on