package ocaml-protoc-plugin

  1. Overview
  2. Docs

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

val sprintf : ('a, unit, string) format -> 'a
val printf : ('a, out_channel, unit) format -> 'a
type t = {
  1. mutable fields : Protobuf__.Field.t list;
}
type error = [
  1. | `Premature_end_of_input
  2. | `Unknown_field_type of int
]
val init : unit -> t
val size_of_field : Protobuf__.Field.t -> int
val size : t -> int
val write_varint : bytes -> offset:int -> int64 -> int
val set_int64 : bytes -> int -> int64 -> unit
val write_fixed32 : bytes -> offset:int -> Int32.t -> int
val write_fixed64 : bytes -> offset:int -> Int64.t -> int
val write_length_delimited : bytes -> offset:int -> src:string -> src_pos:int -> len:int -> int
val contents : t -> string
val add_field : t -> Protobuf__.Field.t -> unit
val concat : t -> src:t -> unit

Add the contents of src as is

val write_field_header : t -> int -> int -> unit
val write_field : t -> int -> Protobuf__.Field.t -> unit
val concat_as_length_delimited : t -> src:t -> int -> unit

Add the contents of src as a length_delimited field

val dump : t -> unit
module Test : sig ... end
OCaml

Innovation. Community. Security.