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)
| 98 | // the enum and the index path to reach the enum declaration. |
| 99 | // The returned slices must not be mutated. |
| 100 | func 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. |