package ocaml-protoc-plugin

  1. Overview
  2. Docs

Describes an enum type.

module EnumReservedRange : sig ... end

Range of reserved numeric values. Reserved values may not be used by entries in the same enum. Reserved ranges may not overlap.

type t = {
  1. name : string option;
  2. value : EnumValueDescriptorProto.t list;
  3. options : EnumOptions.t option;
  4. reserved_range : EnumReservedRange.t list;
    (*

    Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

    *)
  5. reserved_name : string list;
    (*

    Reserved enum value names, which may not be reused. A given name may only be reserved once.

    *)
}
val make : ?name:string -> ?value:EnumValueDescriptorProto.t list -> ?options:EnumOptions.t -> ?reserved_range:EnumReservedRange.t list -> ?reserved_name:string list -> unit -> t

Helper function to generate a message using default values

Serialize the message to binary format

val from_proto : Ocaml_protoc_plugin.Reader.t -> (t, [> Ocaml_protoc_plugin.Result.error ]) Stdlib.result

Deserialize from binary format

Serialize to Json (compatible with Yojson.Basic.t)

val from_json : Ocaml_protoc_plugin.Json.t -> (t, [> Ocaml_protoc_plugin.Result.error ]) Stdlib.result

Deserialize from Json (compatible with Yojson.Basic.t)

val name : unit -> string

Fully qualified protobuf name of this message

OCaml

Innovation. Community. Security.