package ocaml-protoc-plugin

  1. Overview
  2. Docs

Module Protobuf.WriterSource

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

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

Add the contents of src as is

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

Add the contents of src as a length_delimited field

Sourceval dump : t -> unit
Sourcemodule Test : sig ... end
OCaml

Innovation. Community. Security.