package ocaml-protoc

  1. Overview
  2. Docs
Pure OCaml compiler for .proto files

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-protoc-3.1.1.tbz
sha256=c5657fcbfcbaea361beb847f72b8a6a6f36ce9e773bf285b278a0da75f988fbc
sha512=ea86d04b6293eba48360409049f907fc3e73138ec434b5d1894a2dcdaa0478f6f5a1d13f1ba87c553ddf6806a618525f621d2af862b495ce3426242a3a42e339

doc/ocaml-protoc.compiler-lib/Ocaml_protoc_compiler_lib/Pb_option/index.html

Module Ocaml_protoc_compiler_lib.Pb_optionSource

Protobuf File/Message/Field options

Sourcetype constant =
  1. | Constant_string of string
  2. | Constant_bool of bool
  3. | Constant_int of int
  4. | Constant_float of float
  5. | Constant_literal of string

Protobuf constant

As defined in: Protobuf Language Spec.

Sourcetype message_literal = (string * value) list
Sourceand list_literal = value list
Sourceand value =
  1. | Scalar_value of constant
  2. | Message_literal of message_literal
  3. | List_literal of list_literal
Sourcetype option_name = string

Option identifier

Sourcetype set = t list

Collection of options

Can be used for field/message or file options

Sourceval empty : set
Sourceval add : set -> string -> value -> set
Sourceval merge : set -> set -> set

merge s1 s2 adds all the options from s2 to s1. This means than in case of duplicates s2 options will override s1 options.

Sourceval get : set -> string -> value option
Sourceval pp_constant : Format.formatter -> constant -> unit
Sourceval pp_value : Format.formatter -> value -> unit
Sourceval pp_message_literal : Format.formatter -> message_literal -> unit
Sourceval pp_message_field : Format.formatter -> (string * value) -> unit
Sourceval pp_t : Format.formatter -> t -> unit
Sourceval pp_set : Format.formatter -> set -> unit
OCaml

Innovation. Community. Security.