package ocaml-protoc-plugin

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

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.0.tar.gz
md5=278461dfca05f428e54abddfdf229471
sha512=b54528f0079c3d38d746ba97e48530bc87edfa684bc814623c450ee65502c6d16b9ae304c6ea6e19ff0ca84c454601a367abd35b295abf5b727bc702ff792716

doc/ocaml-protoc-plugin.protobuf/Protobuf/Reader/index.html

Module Protobuf.ReaderSource

Some buffer to hold data, and to read and write data

Sourcetype t = {
  1. mutable offset : int;
  2. end_offset : int;
  3. data : StdLabels.String.t;
}
Sourcetype error = [
  1. | `Premature_end_of_input
  2. | `Unknown_field_type of int
]
Sourceval create : ?offset:int -> ?length:int -> StdLabels.String.t -> t
Sourceval size : t -> int
Sourceval validate_capacity : t -> int -> (unit, [> `Premature_end_of_input ]) result

Return an error if there is not enough data in input

Sourceval has_more : t -> bool

Test if there is more data in the buffer to be read

Sourceval read_byte : t -> (int, [> `Premature_end_of_input ]) result
Sourceval read_raw_varint : t -> (int64, [> `Premature_end_of_input ]) result
Sourceval read_varint : t -> (Protobuf__.Field.t, [> `Premature_end_of_input ]) result
Sourceval read_field_header : t -> (int * int) Result.t
Sourceval read_length_delimited : t -> (Protobuf__.Field.t, [> `Premature_end_of_input ]) result
Sourceval read_fixed32 : t -> (Protobuf__.Field.t, [> `Premature_end_of_input ]) result
Sourceval read_fixed64 : t -> (Protobuf__.Field.t, [> `Premature_end_of_input ]) result
Sourceval read_field : t -> (int * Protobuf__.Field.t) Result.t
OCaml

Innovation. Community. Security.