package ocaml-protoc

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-protoc-4.0.tbz
sha256=88533848ee8ad662bfb063f34932286405977fa3810515b997119b06f05105e4
sha512=df12c71f7181eafc94cd0fc400edf7f258cdd3740a5badafce097f771b7828fed9a9a9c0a457e7e118848a8b1ddd87fe3134a5bdf88d4adcb0d0e04ba6808c5f

doc/src/ocaml-protoc.compiler-lib/pb_codegen_mode.ml.html

Source file pb_codegen_mode.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
type t =
  [ `Normal
  | `Encode_only
  | `Decode_only
  ]

let to_string = function
  | `Normal -> "normal"
  | `Encode_only -> "encode_only"
  | `Decode_only -> "decode_only"

let do_encode = function
  | `Normal | `Encode_only -> true
  | `Decode_only -> false

let do_decode = function
  | `Normal | `Decode_only -> true
  | `Encode_only -> false