package ocaml-protoc-plugin

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Protobuf.EnumDescriptorProto

Describes an enum type.

Sourcemodule 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.

Note that this is distinct from DescriptorProto.ReservedRange in that it is inclusive such that it can appropriately represent the entire int32 domain.

Sourcetype 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.

    *)
}
Sourceval 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

Deserialize from binary format

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

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

Sourceval name : unit -> string

Fully qualified protobuf name of this message