#[non_exhaustive]pub enum FeatureOverride {
EnumType(EnumTypeOverride),
}Expand description
A path-scoped protobuf editions feature override, applied by mutating the
parsed descriptors before generation (see
feature_overrides).
Editions unification models proto2 and proto3 as editions with fixed feature defaults, so an override’s semantics are “what this proto would say had it been migrated to editions and this feature set at this path”. Each variant is admitted only once buffa’s codegen, runtime, and validation handle the descriptor states it can create — the enum is the allowlist. Overrides never change the wire format.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EnumType(EnumTypeOverride)
Override features.enum_type for matching enums or enum fields.
An enum-type path mutates the enum’s own descriptor (a spec-valid
editions construct that also flows into the embedded reflection
pool); a field path injects a field-level override honored by buffa’s
feature resolution only (enum_type is not a legal field target, so
other runtimes reading the exported descriptors ignore it).
Implementations§
Source§impl FeatureOverride
impl FeatureOverride
Sourcepub fn feature_name(&self) -> &'static str
pub fn feature_name(&self) -> &'static str
The editions feature name this override sets, as spelled in
google.protobuf.FeatureSet (e.g. for diagnostics).
Sourcepub fn value_name(&self) -> &'static str
pub fn value_name(&self) -> &'static str
The feature value this override sets, as spelled in the descriptor enum (e.g. for diagnostics).
Trait Implementations§
Source§impl Clone for FeatureOverride
impl Clone for FeatureOverride
Source§fn clone(&self) -> FeatureOverride
fn clone(&self) -> FeatureOverride
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more