Commit 21128f0
committed
Add linked descriptor types for runtime reflection
Introduces MessageDescriptor, FieldDescriptor, EnumDescriptor and
supporting types as the processed, feature-resolved layer on top of the
raw FileDescriptorProto tree. Where raw protos use string type_name
references and unresolved FeatureSet options, these use pool indices
(MessageIndex/EnumIndex, avoiding Arc cycles) and pre-resolved edition
features (FieldPresence, packed, delimited).
FieldKind flattens protobuf's type × label × map-entry axes into a
single Copy discriminant via a SingularKind sub-enum — invalid states
like List(List(...)) are unrepresentable, and no Box allocation is
needed.
These types are constructed by DescriptorPool (next PR) and consumed by
DynamicMessage. #[non_exhaustive] with pub fields allows reads without
external construction.1 parent 93b88c2 commit 21128f0
0 commit comments