package ocaml-protoc-plugin
Module Protobuf.Type
A protocol buffer message type.
Source
type t = {name : string;(*The fully qualified message name.
*)fields : Field.t list;(*The list of fields.
*)oneofs : string list;(*The list of types appearing in
*)oneofdefinitions in this type.options : Option.t list;(*The protocol buffer options.
*)source_context : Source_context.Google.Protobuf.SourceContext.t option;(*The source context.
*)syntax : Syntax.t;(*The source syntax.
*)
}Source
val make :
?name:string ->
?fields:Field.t list ->
?oneofs:string list ->
?options:Option.t list ->
?source_context:Source_context.Google.Protobuf.SourceContext.t ->
?syntax:Syntax.t ->
unit ->
tHelper function to generate a message using default values
Serialize the message to binary format
Source
val from_proto :
Ocaml_protoc_plugin.Reader.t ->
(t, [> Ocaml_protoc_plugin.Result.error ]) resultDeserialize from binary format
Serialize to Json (compatible with Yojson.Basic.t)
Source
val from_json :
Ocaml_protoc_plugin.Json.t ->
(t, [> Ocaml_protoc_plugin.Result.error ]) resultDeserialize from Json (compatible with Yojson.Basic.t)
Fully qualified protobuf name of this message