Expand description
Edition feature resolution.
Protoc emits only unresolved (user-written) features in descriptor
options. This module resolves them by walking the descriptor hierarchy
(file → message → field/enum/oneof) and merging overrides onto edition
defaults, matching the algorithm in protobuf’s C++ FeatureResolver.
Used by both [crate::pool::DescriptorPool] (runtime reflection) and
buffa-codegen (re-exported via buffa_codegen::features). Codegen adds
one extra resolver, resolve_field, that needs CodeGenContext and so
lives in buffa-codegen.
Structs§
- Resolved
Features - The resolved set of edition features for a protobuf element.
Enums§
- Enum
Type - Controls how unknown enum values are handled.
- Field
Presence - Controls whether field presence is tracked.
- Json
Format - Controls JSON format support.
- Message
Encoding - Controls wire encoding of message fields.
- Repeated
Field Encoding - Controls wire encoding of repeated scalar fields.
- Utf8
Validation - Controls UTF-8 validation for string fields.
Functions§
- enum_
features - Extract the unresolved
FeatureSetfrom enum options. - field_
features - Extract the unresolved
FeatureSetfrom field options. - for_
file - Resolve a file’s effective features from its declared syntax/edition and any explicit file-level feature overrides.
- message_
features - Extract the unresolved
FeatureSetfrom message options. - oneof_
features - Extract the unresolved
FeatureSetfrom oneof options. - resolve_
child - Compute a child element’s resolved features by merging the parent’s
resolved features with the child’s unresolved
FeatureSetoverride.