MCPcopy
hub / github.com/golang/protobuf / EnumRawDescriptor

Function EnumRawDescriptor

descriptor/descriptor.go:100–106  ·  view source on GitHub ↗

EnumRawDescriptor returns the GZIP'd raw file descriptor representing the enum and the index path to reach the enum declaration. The returned slices must not be mutated.

(e proto.GeneratedEnum)

Source from the content-addressed store, hash-verified

98// the enum and the index path to reach the enum declaration.
99// The returned slices must not be mutated.
100func EnumRawDescriptor(e proto.GeneratedEnum) ([]byte, []int) {
101 if ev, ok := e.(interface{ EnumDescriptor() ([]byte, []int) }); ok {
102 return ev.EnumDescriptor()
103 }
104 ed := protoimpl.X.EnumTypeOf(e)
105 return deriveRawDescriptor(ed.Descriptor())
106}
107
108// MessageRawDescriptor returns the GZIP'd raw file descriptor representing
109// the message and the index path to reach the message declaration.

Callers 2

TestEnumDescriptorFunction · 0.85
EnumDescriptorProtoFunction · 0.85

Calls 3

deriveRawDescriptorFunction · 0.85
DescriptorMethod · 0.65
EnumDescriptorMethod · 0.45

Tested by 1

TestEnumDescriptorFunction · 0.68