package ocaml-protoc-plugin

  1. Overview
  2. Docs
Plugin for protoc protobuf compiler to generate ocaml definitions from a .proto file

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-protoc-plugin-4.2.0.tbz
md5=7837774e6637afdbd5e3b1066c01d3b1
sha512=3d96bbdf8a391b8e7903ca07d28507e7568b063521be84f62e9e0e30728ada4cae3553a9239254fb4f2bde480e6cfeb05ec4a2bab699c755a6890108b8f889e6

doc/ocaml-protoc-plugin/Ocaml_protoc_plugin/Result/index.html

Module Ocaml_protoc_plugin.ResultSource

This module provides result type and functions for compatibility * with OCaml 4.06

Sourcetype error = [
  1. | `Premature_end_of_input
  2. | `Unknown_field_type of int
  3. | `Wrong_field_type of string * Ocaml_protoc_plugin__.Field.t
  4. | `Illegal_value of string * Ocaml_protoc_plugin__.Field.t
  5. | `Unknown_enum_value of int
  6. | `Oneof_missing
  7. | `Required_field_missing
]
Sourcetype 'a t = ('a, error) result
Sourceval (>>|) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result
Sourceval (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
Sourceval open_error : ('a, [< error ]) result -> ('a, [> `Illegal_value of string * Ocaml_protoc_plugin__.Field.t | `Oneof_missing | `Premature_end_of_input | `Required_field_missing | `Unknown_enum_value of int | `Unknown_field_type of int | `Wrong_field_type of string * Ocaml_protoc_plugin__.Field.t ]) result
Sourceval return : 'a -> ('a, 'b) result
Sourceval fail : 'a -> ('b, 'a) result
Sourceval get : msg:string -> ('a, 'b) result -> 'a
Sourceval pp_error : Format.formatter -> error -> unit
Sourceval show_error : error -> string
Sourceval pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> ('a, [< error ]) result -> unit