From 67a472221676e147fc080b96cbab037adab63da5 Mon Sep 17 00:00:00 2001 From: Yong-yuan-X <2463436064@qq.com> Date: Fri, 26 Jun 2026 21:13:39 +0800 Subject: [PATCH 1/2] Document generated struct field evolution policy --- buffa-codegen/src/comments.rs | 21 ++++++++ buffa-codegen/src/lazy_view.rs | 4 +- buffa-codegen/src/message.rs | 7 ++- buffa-codegen/src/tests/comments.rs | 27 ++++++++++ buffa-codegen/src/view.rs | 7 ++- .../google.protobuf.compiler.plugin.__view.rs | 8 +++ .../google.protobuf.compiler.plugin.rs | 8 +++ .../google.protobuf.descriptor.__view.rs | 54 +++++++++++++++++++ .../generated/google.protobuf.descriptor.rs | 54 +++++++++++++++++++ .../generated/google.protobuf.any.__view.rs | 2 + .../src/generated/google.protobuf.any.rs | 2 + .../google.protobuf.duration.__view.rs | 2 + .../src/generated/google.protobuf.duration.rs | 2 + .../generated/google.protobuf.empty.__view.rs | 2 + .../src/generated/google.protobuf.empty.rs | 2 + .../google.protobuf.field_mask.__view.rs | 2 + .../generated/google.protobuf.field_mask.rs | 2 + .../google.protobuf.struct.__view.rs | 6 +++ .../src/generated/google.protobuf.struct.rs | 6 +++ .../google.protobuf.timestamp.__view.rs | 2 + .../generated/google.protobuf.timestamp.rs | 2 + .../google.protobuf.wrappers.__view.rs | 18 +++++++ .../src/generated/google.protobuf.wrappers.rs | 18 +++++++ docs/guide.md | 5 ++ 24 files changed, 258 insertions(+), 5 deletions(-) diff --git a/buffa-codegen/src/comments.rs b/buffa-codegen/src/comments.rs index ae46b535..3a47e4e2 100644 --- a/buffa-codegen/src/comments.rs +++ b/buffa-codegen/src/comments.rs @@ -19,6 +19,14 @@ use quote::quote; use crate::generated::descriptor::{DescriptorProto, FileDescriptorProto}; +pub(crate) const GENERATED_STRUCT_EVOLUTION_NOTE: &str = + "Generated struct evolution policy: generated message and view structs may \ + gain fields when the proto schema or buffa's internal bookkeeping changes. \ + Construct values by decoding, by starting from `Default::default()` and \ + setting fields, or by using generated setters where available. Avoid \ + exhaustive struct literals or destructuring; exhaustive field lists are not \ + covered by buffa's semver guarantees."; + // ── Descriptor field numbers (from google/protobuf/descriptor.proto) ──────── // FileDescriptorProto const FILE_MESSAGE_TYPE: i32 = 4; @@ -189,6 +197,19 @@ pub(crate) fn doc_attrs_resolved( } } +pub(crate) fn doc_attrs_with_generated_struct_evolution_note( + comment: Option<&str>, + scope_fqn: &str, + type_map: &HashMap, +) -> TokenStream { + doc_attrs_with_tag_resolved( + comment, + GENERATED_STRUCT_EVOLUTION_NOTE, + scope_fqn, + type_map, + ) +} + /// Like [`doc_attrs_resolved`] but appends a `tag` line after a blank separator. /// /// Useful for adding a "Field N: `name`" annotation after the proto comment body. diff --git a/buffa-codegen/src/lazy_view.rs b/buffa-codegen/src/lazy_view.rs index 1ecb7e66..d14576a2 100644 --- a/buffa-codegen/src/lazy_view.rs +++ b/buffa-codegen/src/lazy_view.rs @@ -202,6 +202,7 @@ pub(crate) fn generate_lazy_view_with_nesting( rust_path_to_tokens(&p) }; + let evolution_policy_note = crate::comments::GENERATED_STRUCT_EVOLUTION_NOTE; let doc = format!( " Lazy view of `{proto_fqn}`: nested and repeated message fields are\n \ recorded as undecoded byte ranges and decoded on access. See\n \ @@ -214,7 +215,8 @@ pub(crate) fn generate_lazy_view_with_nesting( ```rust,ignore\n \ use buffa::LazyMessageView;\n\n \ let view = {rust_name}LazyView::decode_lazy(&bytes)?;\n \ - ```" + ```\n\n \ + {evolution_policy_note}" ); // Lazy field types never leak redacted payloads through Debug (they print diff --git a/buffa-codegen/src/message.rs b/buffa-codegen/src/message.rs index f10016c2..9af3dc65 100644 --- a/buffa-codegen/src/message.rs +++ b/buffa-codegen/src/message.rs @@ -782,8 +782,11 @@ fn generate_message_with_nesting( } }; - let message_doc = - crate::comments::doc_attrs_resolved(ctx.comment(proto_fqn), proto_fqn, &ctx.type_map); + let message_doc = crate::comments::doc_attrs_with_generated_struct_evolution_note( + ctx.comment(proto_fqn), + proto_fqn, + &ctx.type_map, + ); let with_setters_impl = if ctx.config.generate_with_setters && !setter_methods.is_empty() { quote! { diff --git a/buffa-codegen/src/tests/comments.rs b/buffa-codegen/src/tests/comments.rs index fcd35069..8ae2675c 100644 --- a/buffa-codegen/src/tests/comments.rs +++ b/buffa-codegen/src/tests/comments.rs @@ -46,6 +46,33 @@ fn test_message_comment_in_generated_code() { ); } +#[test] +fn test_generated_struct_docs_include_evolution_policy() { + let mut file = proto3_file("evolution_policy.proto"); + file.message_type.push(DescriptorProto { + name: Some("Record".to_string()), + field: vec![make_field("id", 1, Label::LABEL_OPTIONAL, Type::TYPE_INT32)], + ..Default::default() + }); + + let config = CodeGenConfig { + lazy_views: true, + ..Default::default() + }; + let result = generate(&[file], &["evolution_policy.proto".to_string()], &config) + .expect("generation should succeed"); + + let content = joined(&result); + let count = content + .matches(crate::comments::GENERATED_STRUCT_EVOLUTION_NOTE) + .count(); + assert!( + count >= 3, + "owned, eager view, and lazy view structs must document the evolution policy; \ + found {count} occurrence(s):\n{content}" + ); +} + #[test] fn test_field_comment_in_generated_code() { let mut file = proto3_file("field_comment.proto"); diff --git a/buffa-codegen/src/view.rs b/buffa-codegen/src/view.rs index bbf830b2..1ab307a5 100644 --- a/buffa-codegen/src/view.rs +++ b/buffa-codegen/src/view.rs @@ -303,8 +303,11 @@ pub(crate) fn generate_view_with_nesting( rust_path_to_tokens(&p) }; - let view_doc = - crate::comments::doc_attrs_resolved(ctx.comment(proto_fqn), proto_fqn, &ctx.type_map); + let view_doc = crate::comments::doc_attrs_with_generated_struct_evolution_note( + ctx.comment(proto_fqn), + proto_fqn, + &ctx.type_map, + ); // `FooOwnedView`: a `'static` OwnedView handle with per-field accessors. // Skipped for map-entry synthetic messages (never decoded standalone). diff --git a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs index 68cf31ff..78b076a8 100644 --- a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs +++ b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs @@ -2,6 +2,8 @@ // source: google/protobuf/compiler/plugin.proto /// The version number of protocol compiler. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct VersionView<'a> { /// Field 1: `major` @@ -321,6 +323,8 @@ impl ::serde::Serialize for VersionOwnedView { } } /// An encoded CodeGeneratorRequest is written to the plugin's stdin. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct CodeGeneratorRequestView<'a> { /// The .proto files that were explicitly listed on the command-line. The @@ -831,6 +835,8 @@ impl ::serde::Serialize for CodeGeneratorRequestOwnedView { } } /// The plugin writes an encoded CodeGeneratorResponse to stdout. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct CodeGeneratorResponseView<'a> { /// Error message. If non-empty, code generation failed. The plugin process @@ -1268,6 +1274,8 @@ pub mod code_generator_response { #[allow(unused_imports)] use super::*; /// Represents a single generated file. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileView<'a> { /// The file name, relative to the output directory. The name must not diff --git a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs index 83ce4b53..b297b44c 100644 --- a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs +++ b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs @@ -2,6 +2,8 @@ // source: google/protobuf/compiler/plugin.proto /// The version number of protocol compiler. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -305,6 +307,8 @@ pub const __VERSION_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::ty text_merge: ::buffa::type_registry::any_merge_text::, }; /// An encoded CodeGeneratorRequest is written to the plugin's stdin. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -699,6 +703,8 @@ pub const __CODE_GENERATOR_REQUEST_TEXT_ANY: ::buffa::type_registry::TextAnyEntr text_merge: ::buffa::type_registry::any_merge_text::, }; /// The plugin writes an encoded CodeGeneratorResponse to stdout. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -1239,6 +1245,8 @@ pub mod code_generator_response { } } /// Represents a single generated file. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] diff --git a/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs b/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs index 8fb07431..b4619ec5 100644 --- a/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs +++ b/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs @@ -3,6 +3,8 @@ /// The protocol compiler can output a FileDescriptorSet containing the .proto /// files it parses. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileDescriptorSetView<'a> { /// Field 1: `file` @@ -276,6 +278,8 @@ impl ::serde::Serialize for FileDescriptorSetOwnedView { } } /// Describes a complete .proto file. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileDescriptorProtoView<'a> { /// file name, relative to root of source tree @@ -1138,6 +1142,8 @@ impl ::serde::Serialize for FileDescriptorProtoOwnedView { } } /// Describes a message type. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DescriptorProtoView<'a> { /// Field 1: `name` @@ -1862,6 +1868,7 @@ impl ::serde::Serialize for DescriptorProtoOwnedView { pub mod descriptor_proto { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ExtensionRangeView<'a> { /// Inclusive. @@ -2220,6 +2227,8 @@ pub mod descriptor_proto { /// Range of reserved tag numbers. Reserved tag numbers may not be used by /// fields or extension ranges in the same message. Reserved ranges may /// not overlap. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ReservedRangeView<'a> { /// Inclusive. @@ -2509,6 +2518,7 @@ pub mod descriptor_proto { } } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ExtensionRangeOptionsView<'a> { /// The parser stores options it doesn't recognize here. See above. @@ -2971,6 +2981,7 @@ impl ::serde::Serialize for ExtensionRangeOptionsOwnedView { pub mod extension_range_options { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DeclarationView<'a> { /// The extension number declared within the extension range. @@ -3358,6 +3369,8 @@ pub mod extension_range_options { } } /// Describes a field within a message. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FieldDescriptorProtoView<'a> { /// Field 1: `name` @@ -4005,6 +4018,8 @@ impl ::serde::Serialize for FieldDescriptorProtoOwnedView { } } /// Describes a oneof. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct OneofDescriptorProtoView<'a> { /// Field 1: `name` @@ -4318,6 +4333,8 @@ impl ::serde::Serialize for OneofDescriptorProtoOwnedView { } } /// Describes an enum type. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumDescriptorProtoView<'a> { /// Field 1: `name` @@ -4818,6 +4835,8 @@ pub mod enum_descriptor_proto { /// Note that this is distinct from DescriptorProto.ReservedRange in that it /// is inclusive such that it can appropriately represent the entire int32 /// domain. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumReservedRangeView<'a> { /// Inclusive. @@ -5110,6 +5129,8 @@ pub mod enum_descriptor_proto { } } /// Describes a value within an enum. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumValueDescriptorProtoView<'a> { /// Field 1: `name` @@ -5449,6 +5470,8 @@ impl ::serde::Serialize for EnumValueDescriptorProtoOwnedView { } } /// Describes a service. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ServiceDescriptorProtoView<'a> { /// Field 1: `name` @@ -5814,6 +5837,8 @@ impl ::serde::Serialize for ServiceDescriptorProtoOwnedView { } } /// Describes a method of a service. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct MethodDescriptorProtoView<'a> { /// Field 1: `name` @@ -6267,6 +6292,8 @@ impl ::serde::Serialize for MethodDescriptorProtoOwnedView { /// /// If this turns out to be popular, a web service will be set up /// to automatically assign option numbers. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileOptionsView<'a> { /// Sets the Java package where classes generated from this .proto will be @@ -7253,6 +7280,7 @@ impl ::serde::Serialize for FileOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct MessageOptionsView<'a> { /// Set true to use the old proto1 MessageSet wire format for extensions. @@ -7863,6 +7891,7 @@ impl ::serde::Serialize for MessageOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FieldOptionsView<'a> { /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. @@ -8763,6 +8792,7 @@ impl ::serde::Serialize for FieldOptionsOwnedView { pub mod field_options { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EditionDefaultView<'a> { /// Field 3: `edition` @@ -9060,6 +9090,8 @@ pub mod field_options { } } /// Information about the support window of a feature. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSupportView<'a> { /// The edition that this feature was first available in. In editions @@ -9463,6 +9495,7 @@ pub mod field_options { } } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct OneofOptionsView<'a> { /// Any features defined in the specific edition. @@ -9806,6 +9839,7 @@ impl ::serde::Serialize for OneofOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumOptionsView<'a> { /// Set this option to true to allow mapping different tag names to the same @@ -10258,6 +10292,7 @@ impl ::serde::Serialize for EnumOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumValueOptionsView<'a> { /// Is this enum value deprecated? @@ -10732,6 +10767,7 @@ impl ::serde::Serialize for EnumValueOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ServiceOptionsView<'a> { /// Any features defined in the specific edition. @@ -11121,6 +11157,7 @@ impl ::serde::Serialize for ServiceOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct MethodOptionsView<'a> { /// Note: Field numbers 1 through 32 are reserved for Google's internal RPC @@ -11555,6 +11592,8 @@ impl ::serde::Serialize for MethodOptionsOwnedView { /// options protos in descriptor objects (e.g. returned by Descriptor::options(), /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions /// in them. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct UninterpretedOptionView<'a> { /// Field 2: `name` @@ -12007,6 +12046,8 @@ pub mod uninterpreted_option { /// extension (denoted with parentheses in options specs in .proto files). /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents /// "foo.(bar.baz).moo". + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct NamePartView<'a> { /// Field 1: `name_part` @@ -12309,6 +12350,8 @@ Distinguishes a field that was absent from one explicitly encoded with its defau /// readability, but leave us very open to this scenario. A future feature will /// be designed and implemented to handle this, hopefully before we ever hit a /// conflict here. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSetView<'a> { /// Field 1: `field_presence` @@ -12854,6 +12897,7 @@ impl ::serde::Serialize for FeatureSetOwnedView { pub mod feature_set { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct VisibilityFeatureView<'a> { pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>, @@ -13093,6 +13137,8 @@ pub mod feature_set { /// messages are generated from FeatureSet extensions and can be used to seed /// feature resolution. The resolution with this object becomes a simple search /// for the closest matching edition, followed by proto merges. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSetDefaultsView<'a> { /// Field 1: `defaults` @@ -13462,6 +13508,8 @@ pub mod feature_set_defaults { /// defaults. Not all editions may be contained here. For a given edition, /// the defaults at the closest matching edition ordered at or before it should /// be used. This field must be in strict ascending order by edition. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSetEditionDefaultView<'a> { /// Field 3: `edition` @@ -13890,6 +13938,8 @@ pub mod feature_set_defaults { /// /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct SourceCodeInfoView<'a> { /// A Location identifies a piece of source code in a .proto file which @@ -14255,6 +14305,7 @@ impl ::serde::Serialize for SourceCodeInfoOwnedView { pub mod source_code_info { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct LocationView<'a> { /// Identifies which part of the FileDescriptorProto was defined at this @@ -14847,6 +14898,8 @@ pub mod source_code_info { /// Describes the relationship between generated code and its original source /// file. A GeneratedCodeInfo message is associated with only one generated /// source file, but may contain references to different source .proto files. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct GeneratedCodeInfoView<'a> { /// An Annotation connects some span of text in generated code to an element @@ -15128,6 +15181,7 @@ impl ::serde::Serialize for GeneratedCodeInfoOwnedView { pub mod generated_code_info { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct AnnotationView<'a> { /// Identifies the element in the original source .proto file. This field diff --git a/buffa-descriptor/src/generated/google.protobuf.descriptor.rs b/buffa-descriptor/src/generated/google.protobuf.descriptor.rs index c4e8e730..7c8c62cc 100644 --- a/buffa-descriptor/src/generated/google.protobuf.descriptor.rs +++ b/buffa-descriptor/src/generated/google.protobuf.descriptor.rs @@ -410,6 +410,8 @@ impl ::buffa::Enumeration for SymbolVisibility { } /// The protocol compiler can output a FileDescriptorSet containing the .proto /// files it parses. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -732,6 +734,8 @@ pub const __FILE_DESCRIPTOR_SET_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a complete .proto file. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -1552,6 +1556,8 @@ pub const __FILE_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a message type. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -2203,6 +2209,7 @@ pub const __DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = :: pub mod descriptor_proto { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -2470,6 +2477,8 @@ pub mod descriptor_proto { /// Range of reserved tag numbers. Reserved tag numbers may not be used by /// fields or extension ranges in the same message. Reserved ranges may /// not overlap. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -2704,6 +2713,7 @@ pub mod descriptor_proto { #[doc(inline)] pub use super::__buffa::view::descriptor_proto::ReservedRangeOwnedView; } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -3404,6 +3414,7 @@ pub mod extension_range_options { &[Self::DECLARATION, Self::UNVERIFIED] } } + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -3785,6 +3796,8 @@ pub mod extension_range_options { pub use super::__buffa::view::extension_range_options::DeclarationOwnedView; } /// Describes a field within a message. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -4917,6 +4930,8 @@ pub mod field_descriptor_proto { } } /// Describes a oneof. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -5139,6 +5154,8 @@ pub const __ONEOF_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEntr text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes an enum type. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -5563,6 +5580,8 @@ pub mod enum_descriptor_proto { /// Note that this is distinct from DescriptorProto.ReservedRange in that it /// is inclusive such that it can appropriately represent the entire int32 /// domain. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -5792,6 +5811,8 @@ pub mod enum_descriptor_proto { pub use super::__buffa::view::enum_descriptor_proto::EnumReservedRangeOwnedView; } /// Describes a value within an enum. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -6053,6 +6074,8 @@ pub const __ENUM_VALUE_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAn text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a service. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -6322,6 +6345,8 @@ pub const __SERVICE_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEn text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a method of a service. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -6765,6 +6790,8 @@ pub const __METHOD_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEnt /// /// If this turns out to be popular, a web service will be set up /// to automatically assign option numbers. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -8534,6 +8561,7 @@ pub mod file_options { } } } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -9265,6 +9293,7 @@ pub const __MESSAGE_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::b text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -11176,6 +11205,7 @@ pub mod field_options { ] } } + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -11418,6 +11448,8 @@ pub mod field_options { text_merge: ::buffa::type_registry::any_merge_text::, }; /// Information about the support window of a feature. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -11798,6 +11830,7 @@ pub mod field_options { #[doc(inline)] pub use super::__buffa::view::field_options::FeatureSupportOwnedView; } +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -12183,6 +12216,7 @@ pub const __ONEOF_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buf text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -12747,6 +12781,7 @@ pub const __ENUM_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -13304,6 +13339,7 @@ pub const __ENUM_VALUE_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -13752,6 +13788,7 @@ pub const __SERVICE_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::b text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -14451,6 +14488,8 @@ pub mod method_options { /// options protos in descriptor objects (e.g. returned by Descriptor::options(), /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions /// in them. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -14922,6 +14961,8 @@ pub mod uninterpreted_option { /// extension (denoted with parentheses in options specs in .proto files). /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents /// "foo.(bar.baz).moo". + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -15123,6 +15164,8 @@ pub mod uninterpreted_option { /// readability, but leave us very open to this scenario. A future feature will /// be designed and implemented to handle this, hopefully before we ever hit a /// conflict here. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -17121,6 +17164,7 @@ pub mod feature_set { &[Self::ENFORCE_NAMING_STYLE_UNKNOWN, Self::STYLE2024, Self::STYLE_LEGACY] } } + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -17467,6 +17511,8 @@ pub mod feature_set { /// messages are generated from FeatureSet extensions and can be used to seed /// feature resolution. The resolution with this object becomes a simple search /// for the closest matching edition, followed by proto merges. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -17774,6 +17820,8 @@ pub mod feature_set_defaults { /// defaults. Not all editions may be contained here. For a given edition, /// the defaults at the closest matching edition ordered at or before it should /// be used. This field must be in strict ascending order by edition. + /// + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -18075,6 +18123,8 @@ pub mod feature_set_defaults { /// /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -18447,6 +18497,7 @@ pub const __SOURCE_CODE_INFO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = :: pub mod source_code_info { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -18959,6 +19010,8 @@ pub mod source_code_info { /// Describes the relationship between generated code and its original source /// file. A GeneratedCodeInfo message is associated with only one generated /// source file, but may contain references to different source .proto files. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -19149,6 +19202,7 @@ pub const __GENERATED_CODE_INFO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = pub mod generated_code_info { #[allow(unused_imports)] use super::*; + /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] diff --git a/buffa-types/src/generated/google.protobuf.any.__view.rs b/buffa-types/src/generated/google.protobuf.any.__view.rs index 11738529..aaa92166 100644 --- a/buffa-types/src/generated/google.protobuf.any.__view.rs +++ b/buffa-types/src/generated/google.protobuf.any.__view.rs @@ -98,6 +98,8 @@ /// "value": "1.212s" /// } /// ``` +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct AnyView<'a> { /// A URL/resource name that uniquely identifies the type of the serialized diff --git a/buffa-types/src/generated/google.protobuf.any.rs b/buffa-types/src/generated/google.protobuf.any.rs index 30eda240..7972f58b 100644 --- a/buffa-types/src/generated/google.protobuf.any.rs +++ b/buffa-types/src/generated/google.protobuf.any.rs @@ -98,6 +98,8 @@ /// "value": "1.212s" /// } /// ``` +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Any { diff --git a/buffa-types/src/generated/google.protobuf.duration.__view.rs b/buffa-types/src/generated/google.protobuf.duration.__view.rs index e6588216..1956d326 100644 --- a/buffa-types/src/generated/google.protobuf.duration.__view.rs +++ b/buffa-types/src/generated/google.protobuf.duration.__view.rs @@ -65,6 +65,8 @@ /// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 /// microsecond should be expressed in JSON format as "3.000001s". +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DurationView<'a> { /// Signed seconds of the span of time. Must be from -315,576,000,000 diff --git a/buffa-types/src/generated/google.protobuf.duration.rs b/buffa-types/src/generated/google.protobuf.duration.rs index 2f016288..a27a449a 100644 --- a/buffa-types/src/generated/google.protobuf.duration.rs +++ b/buffa-types/src/generated/google.protobuf.duration.rs @@ -65,6 +65,8 @@ /// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 /// microsecond should be expressed in JSON format as "3.000001s". +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Duration { diff --git a/buffa-types/src/generated/google.protobuf.empty.__view.rs b/buffa-types/src/generated/google.protobuf.empty.__view.rs index 704561b3..26d359ab 100644 --- a/buffa-types/src/generated/google.protobuf.empty.__view.rs +++ b/buffa-types/src/generated/google.protobuf.empty.__view.rs @@ -10,6 +10,8 @@ /// ```text /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); /// ``` +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EmptyView<'a> { pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>, diff --git a/buffa-types/src/generated/google.protobuf.empty.rs b/buffa-types/src/generated/google.protobuf.empty.rs index 62ada694..a3fabc7e 100644 --- a/buffa-types/src/generated/google.protobuf.empty.rs +++ b/buffa-types/src/generated/google.protobuf.empty.rs @@ -10,6 +10,8 @@ /// ```text /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); /// ``` +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Empty { diff --git a/buffa-types/src/generated/google.protobuf.field_mask.__view.rs b/buffa-types/src/generated/google.protobuf.field_mask.__view.rs index 31741ba8..6d0e9b85 100644 --- a/buffa-types/src/generated/google.protobuf.field_mask.__view.rs +++ b/buffa-types/src/generated/google.protobuf.field_mask.__view.rs @@ -224,6 +224,8 @@ /// The implementation of any API method which has a FieldMask type field in the /// request should verify the included field paths, and return an /// `INVALID_ARGUMENT` error if any path is unmappable. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FieldMaskView<'a> { /// The set of field mask paths. diff --git a/buffa-types/src/generated/google.protobuf.field_mask.rs b/buffa-types/src/generated/google.protobuf.field_mask.rs index 0d996116..aaba286b 100644 --- a/buffa-types/src/generated/google.protobuf.field_mask.rs +++ b/buffa-types/src/generated/google.protobuf.field_mask.rs @@ -224,6 +224,8 @@ /// The implementation of any API method which has a FieldMask type field in the /// request should verify the included field paths, and return an /// `INVALID_ARGUMENT` error if any path is unmappable. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct FieldMask { diff --git a/buffa-types/src/generated/google.protobuf.struct.__view.rs b/buffa-types/src/generated/google.protobuf.struct.__view.rs index f416bcbf..8f3a82fe 100644 --- a/buffa-types/src/generated/google.protobuf.struct.__view.rs +++ b/buffa-types/src/generated/google.protobuf.struct.__view.rs @@ -9,6 +9,8 @@ /// with the proto support for the language. /// /// The JSON representation for `Struct` is JSON object. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct StructView<'a> { /// Unordered map of dynamically typed values. @@ -394,6 +396,8 @@ const _: () = { /// variants. Absence of any variant indicates an error. /// /// The JSON representation for `Value` is JSON value. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ValueView<'a> { pub kind: ::core::option::Option< @@ -1006,6 +1010,8 @@ const _: () = { /// `ListValue` is a wrapper around a repeated field of values. /// /// The JSON representation for `ListValue` is JSON array. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ListValueView<'a> { /// Repeated field of dynamically typed values. diff --git a/buffa-types/src/generated/google.protobuf.struct.rs b/buffa-types/src/generated/google.protobuf.struct.rs index c39e25b6..f4eb70f0 100644 --- a/buffa-types/src/generated/google.protobuf.struct.rs +++ b/buffa-types/src/generated/google.protobuf.struct.rs @@ -55,6 +55,8 @@ impl ::buffa::Enumeration for NullValue { /// with the proto support for the language. /// /// The JSON representation for `Struct` is JSON object. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Struct { @@ -343,6 +345,8 @@ pub const __STRUCT_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::typ /// variants. Absence of any variant indicates an error. /// /// The JSON representation for `Value` is JSON value. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Value { @@ -905,6 +909,8 @@ pub mod value { /// `ListValue` is a wrapper around a repeated field of values. /// /// The JSON representation for `ListValue` is JSON array. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct ListValue { diff --git a/buffa-types/src/generated/google.protobuf.timestamp.__view.rs b/buffa-types/src/generated/google.protobuf.timestamp.__view.rs index dbbc94a6..54cf9d8e 100644 --- a/buffa-types/src/generated/google.protobuf.timestamp.__view.rs +++ b/buffa-types/src/generated/google.protobuf.timestamp.__view.rs @@ -102,6 +102,8 @@ /// the Joda Time's \[`ISODateTimeFormat.dateTime()`\]( /// ) /// ) to obtain a formatter capable of generating timestamps in this format. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct TimestampView<'a> { /// Represents seconds of UTC time since Unix epoch diff --git a/buffa-types/src/generated/google.protobuf.timestamp.rs b/buffa-types/src/generated/google.protobuf.timestamp.rs index 6d31ccce..4c1c8a26 100644 --- a/buffa-types/src/generated/google.protobuf.timestamp.rs +++ b/buffa-types/src/generated/google.protobuf.timestamp.rs @@ -102,6 +102,8 @@ /// the Joda Time's \[`ISODateTimeFormat.dateTime()`\]( /// ) /// ) to obtain a formatter capable of generating timestamps in this format. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Timestamp { diff --git a/buffa-types/src/generated/google.protobuf.wrappers.__view.rs b/buffa-types/src/generated/google.protobuf.wrappers.__view.rs index 88ebff4d..302ddac5 100644 --- a/buffa-types/src/generated/google.protobuf.wrappers.__view.rs +++ b/buffa-types/src/generated/google.protobuf.wrappers.__view.rs @@ -4,6 +4,8 @@ /// Wrapper message for `double`. /// /// The JSON representation for `DoubleValue` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DoubleValueView<'a> { /// The double value. @@ -309,6 +311,8 @@ const _: () = { /// Wrapper message for `float`. /// /// The JSON representation for `FloatValue` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FloatValueView<'a> { /// The float value. @@ -614,6 +618,8 @@ const _: () = { /// Wrapper message for `int64`. /// /// The JSON representation for `Int64Value` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct Int64ValueView<'a> { /// The int64 value. @@ -919,6 +925,8 @@ const _: () = { /// Wrapper message for `uint64`. /// /// The JSON representation for `UInt64Value` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct UInt64ValueView<'a> { /// The uint64 value. @@ -1224,6 +1232,8 @@ const _: () = { /// Wrapper message for `int32`. /// /// The JSON representation for `Int32Value` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct Int32ValueView<'a> { /// The int32 value. @@ -1529,6 +1539,8 @@ const _: () = { /// Wrapper message for `uint32`. /// /// The JSON representation for `UInt32Value` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct UInt32ValueView<'a> { /// The uint32 value. @@ -1834,6 +1846,8 @@ const _: () = { /// Wrapper message for `bool`. /// /// The JSON representation for `BoolValue` is JSON `true` and `false`. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct BoolValueView<'a> { /// The bool value. @@ -2139,6 +2153,8 @@ const _: () = { /// Wrapper message for `string`. /// /// The JSON representation for `StringValue` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct StringValueView<'a> { /// The string value. @@ -2444,6 +2460,8 @@ const _: () = { /// Wrapper message for `bytes`. /// /// The JSON representation for `BytesValue` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct BytesValueView<'a> { /// The bytes value. diff --git a/buffa-types/src/generated/google.protobuf.wrappers.rs b/buffa-types/src/generated/google.protobuf.wrappers.rs index f350d9a1..61382876 100644 --- a/buffa-types/src/generated/google.protobuf.wrappers.rs +++ b/buffa-types/src/generated/google.protobuf.wrappers.rs @@ -4,6 +4,8 @@ /// Wrapper message for `double`. /// /// The JSON representation for `DoubleValue` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct DoubleValue { @@ -236,6 +238,8 @@ pub const __DOUBLE_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `float`. /// /// The JSON representation for `FloatValue` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct FloatValue { @@ -468,6 +472,8 @@ pub const __FLOAT_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa /// Wrapper message for `int64`. /// /// The JSON representation for `Int64Value` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Int64Value { @@ -700,6 +706,8 @@ pub const __INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa: /// Wrapper message for `uint64`. /// /// The JSON representation for `UInt64Value` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct UInt64Value { @@ -932,6 +940,8 @@ pub const __U_INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `int32`. /// /// The JSON representation for `Int32Value` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Int32Value { @@ -1164,6 +1174,8 @@ pub const __INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa: /// Wrapper message for `uint32`. /// /// The JSON representation for `UInt32Value` is JSON number. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct UInt32Value { @@ -1396,6 +1408,8 @@ pub const __U_INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `bool`. /// /// The JSON representation for `BoolValue` is JSON `true` and `false`. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct BoolValue { @@ -1628,6 +1642,8 @@ pub const __BOOL_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa: /// Wrapper message for `string`. /// /// The JSON representation for `StringValue` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct StringValue { @@ -1860,6 +1876,8 @@ pub const __STRING_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `bytes`. /// /// The JSON representation for `BytesValue` is JSON string. +/// +/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct BytesValue { diff --git a/docs/guide.md b/docs/guide.md index d2e34acf..a0f0a7d3 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -673,6 +673,11 @@ Key design choices: - **`MessageField`** for sub-message fields (not `Option>`) - **`EnumValue`** for open enum fields (not raw `i32`) - **`__buffa_unknown_fields`** preserves fields from newer schema versions +- **Struct evolution policy**: generated message and view structs may gain + fields as schemas evolve or buffa adds internal bookkeeping. Construct values + by decoding, starting from `Default::default()` and setting fields, or using + generated setters where available; exhaustive struct literals and + destructuring are not covered by buffa's semver guarantees. - **Module nesting** for nested message types (`outer::Inner`, not `OuterInner`) - **No serialization state** — sizes live in an external [`SizeCache`](https://docs.rs/buffa/latest/buffa/struct.SizeCache.html), so the struct holds only its proto fields plus the unknown-fields plumbing, with no interior mutability From a225d8af6329947a4fdde9fb7c2c08d6a9cc439e Mon Sep 17 00:00:00 2001 From: Iain McGinniss <309153+iainmcgin@users.noreply.github.com> Date: Sat, 27 Jun 2026 00:09:35 +0000 Subject: [PATCH 2/2] Move struct evolution policy to Message trait docs Per maintainer review on #244: the policy is a library-level contract, so it belongs on the runtime trait docs (alongside the existing serialization model / thread safety / manual-impl sections) rather than repeated on every generated struct. The per-struct note also became the rustdoc summary line for any proto message without a leading comment, which polluted module indexes and search. - Add a '# Struct evolution policy' section to the buffa::Message trait doc, with the full text including an explicit blessing of Foo { x, ..Default::default() } and the deliberate-not-non_exhaustive rationale. - Add one-line cross-references from MessageView and LazyMessageView. - Revert the per-struct codegen note and the checked-in regen. - Keep the docs/guide.md bullet (now linking to the trait section). - Merge origin/main for the changie infra and add a Changed fragment. Refs #202. --- .../unreleased/changed-20260627-000610.yaml | 3 ++ buffa-codegen/src/comments.rs | 21 -------- buffa-codegen/src/lazy_view.rs | 4 +- buffa-codegen/src/message.rs | 7 +-- buffa-codegen/src/tests/comments.rs | 27 ---------- buffa-codegen/src/view.rs | 7 +-- .../google.protobuf.compiler.plugin.__view.rs | 8 --- .../google.protobuf.compiler.plugin.rs | 8 --- .../google.protobuf.descriptor.__view.rs | 54 ------------------- .../generated/google.protobuf.descriptor.rs | 54 ------------------- .../generated/google.protobuf.any.__view.rs | 2 - .../src/generated/google.protobuf.any.rs | 2 - .../google.protobuf.duration.__view.rs | 2 - .../src/generated/google.protobuf.duration.rs | 2 - .../generated/google.protobuf.empty.__view.rs | 2 - .../src/generated/google.protobuf.empty.rs | 2 - .../google.protobuf.field_mask.__view.rs | 2 - .../generated/google.protobuf.field_mask.rs | 2 - .../google.protobuf.struct.__view.rs | 6 --- .../src/generated/google.protobuf.struct.rs | 6 --- .../google.protobuf.timestamp.__view.rs | 2 - .../generated/google.protobuf.timestamp.rs | 2 - .../google.protobuf.wrappers.__view.rs | 18 ------- .../src/generated/google.protobuf.wrappers.rs | 18 ------- buffa/src/message.rs | 22 ++++++++ buffa/src/view.rs | 6 +++ docs/guide.md | 8 +-- 27 files changed, 41 insertions(+), 256 deletions(-) create mode 100644 .changes/unreleased/changed-20260627-000610.yaml diff --git a/.changes/unreleased/changed-20260627-000610.yaml b/.changes/unreleased/changed-20260627-000610.yaml new file mode 100644 index 00000000..2129c0ce --- /dev/null +++ b/.changes/unreleased/changed-20260627-000610.yaml @@ -0,0 +1,3 @@ +kind: Changed +body: 'Documented the struct evolution policy for generated types: exhaustive struct literals and destructuring of generated message/view structs are not covered by semver. See the `Message` trait docs. (#202, #244)' +time: 2026-06-27T00:06:10.071892619Z diff --git a/buffa-codegen/src/comments.rs b/buffa-codegen/src/comments.rs index 3a47e4e2..ae46b535 100644 --- a/buffa-codegen/src/comments.rs +++ b/buffa-codegen/src/comments.rs @@ -19,14 +19,6 @@ use quote::quote; use crate::generated::descriptor::{DescriptorProto, FileDescriptorProto}; -pub(crate) const GENERATED_STRUCT_EVOLUTION_NOTE: &str = - "Generated struct evolution policy: generated message and view structs may \ - gain fields when the proto schema or buffa's internal bookkeeping changes. \ - Construct values by decoding, by starting from `Default::default()` and \ - setting fields, or by using generated setters where available. Avoid \ - exhaustive struct literals or destructuring; exhaustive field lists are not \ - covered by buffa's semver guarantees."; - // ── Descriptor field numbers (from google/protobuf/descriptor.proto) ──────── // FileDescriptorProto const FILE_MESSAGE_TYPE: i32 = 4; @@ -197,19 +189,6 @@ pub(crate) fn doc_attrs_resolved( } } -pub(crate) fn doc_attrs_with_generated_struct_evolution_note( - comment: Option<&str>, - scope_fqn: &str, - type_map: &HashMap, -) -> TokenStream { - doc_attrs_with_tag_resolved( - comment, - GENERATED_STRUCT_EVOLUTION_NOTE, - scope_fqn, - type_map, - ) -} - /// Like [`doc_attrs_resolved`] but appends a `tag` line after a blank separator. /// /// Useful for adding a "Field N: `name`" annotation after the proto comment body. diff --git a/buffa-codegen/src/lazy_view.rs b/buffa-codegen/src/lazy_view.rs index d14576a2..1ecb7e66 100644 --- a/buffa-codegen/src/lazy_view.rs +++ b/buffa-codegen/src/lazy_view.rs @@ -202,7 +202,6 @@ pub(crate) fn generate_lazy_view_with_nesting( rust_path_to_tokens(&p) }; - let evolution_policy_note = crate::comments::GENERATED_STRUCT_EVOLUTION_NOTE; let doc = format!( " Lazy view of `{proto_fqn}`: nested and repeated message fields are\n \ recorded as undecoded byte ranges and decoded on access. See\n \ @@ -215,8 +214,7 @@ pub(crate) fn generate_lazy_view_with_nesting( ```rust,ignore\n \ use buffa::LazyMessageView;\n\n \ let view = {rust_name}LazyView::decode_lazy(&bytes)?;\n \ - ```\n\n \ - {evolution_policy_note}" + ```" ); // Lazy field types never leak redacted payloads through Debug (they print diff --git a/buffa-codegen/src/message.rs b/buffa-codegen/src/message.rs index 9af3dc65..f10016c2 100644 --- a/buffa-codegen/src/message.rs +++ b/buffa-codegen/src/message.rs @@ -782,11 +782,8 @@ fn generate_message_with_nesting( } }; - let message_doc = crate::comments::doc_attrs_with_generated_struct_evolution_note( - ctx.comment(proto_fqn), - proto_fqn, - &ctx.type_map, - ); + let message_doc = + crate::comments::doc_attrs_resolved(ctx.comment(proto_fqn), proto_fqn, &ctx.type_map); let with_setters_impl = if ctx.config.generate_with_setters && !setter_methods.is_empty() { quote! { diff --git a/buffa-codegen/src/tests/comments.rs b/buffa-codegen/src/tests/comments.rs index 8ae2675c..fcd35069 100644 --- a/buffa-codegen/src/tests/comments.rs +++ b/buffa-codegen/src/tests/comments.rs @@ -46,33 +46,6 @@ fn test_message_comment_in_generated_code() { ); } -#[test] -fn test_generated_struct_docs_include_evolution_policy() { - let mut file = proto3_file("evolution_policy.proto"); - file.message_type.push(DescriptorProto { - name: Some("Record".to_string()), - field: vec![make_field("id", 1, Label::LABEL_OPTIONAL, Type::TYPE_INT32)], - ..Default::default() - }); - - let config = CodeGenConfig { - lazy_views: true, - ..Default::default() - }; - let result = generate(&[file], &["evolution_policy.proto".to_string()], &config) - .expect("generation should succeed"); - - let content = joined(&result); - let count = content - .matches(crate::comments::GENERATED_STRUCT_EVOLUTION_NOTE) - .count(); - assert!( - count >= 3, - "owned, eager view, and lazy view structs must document the evolution policy; \ - found {count} occurrence(s):\n{content}" - ); -} - #[test] fn test_field_comment_in_generated_code() { let mut file = proto3_file("field_comment.proto"); diff --git a/buffa-codegen/src/view.rs b/buffa-codegen/src/view.rs index 1ab307a5..bbf830b2 100644 --- a/buffa-codegen/src/view.rs +++ b/buffa-codegen/src/view.rs @@ -303,11 +303,8 @@ pub(crate) fn generate_view_with_nesting( rust_path_to_tokens(&p) }; - let view_doc = crate::comments::doc_attrs_with_generated_struct_evolution_note( - ctx.comment(proto_fqn), - proto_fqn, - &ctx.type_map, - ); + let view_doc = + crate::comments::doc_attrs_resolved(ctx.comment(proto_fqn), proto_fqn, &ctx.type_map); // `FooOwnedView`: a `'static` OwnedView handle with per-field accessors. // Skipped for map-entry synthetic messages (never decoded standalone). diff --git a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs index 78b076a8..68cf31ff 100644 --- a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs +++ b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.__view.rs @@ -2,8 +2,6 @@ // source: google/protobuf/compiler/plugin.proto /// The version number of protocol compiler. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct VersionView<'a> { /// Field 1: `major` @@ -323,8 +321,6 @@ impl ::serde::Serialize for VersionOwnedView { } } /// An encoded CodeGeneratorRequest is written to the plugin's stdin. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct CodeGeneratorRequestView<'a> { /// The .proto files that were explicitly listed on the command-line. The @@ -835,8 +831,6 @@ impl ::serde::Serialize for CodeGeneratorRequestOwnedView { } } /// The plugin writes an encoded CodeGeneratorResponse to stdout. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct CodeGeneratorResponseView<'a> { /// Error message. If non-empty, code generation failed. The plugin process @@ -1274,8 +1268,6 @@ pub mod code_generator_response { #[allow(unused_imports)] use super::*; /// Represents a single generated file. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileView<'a> { /// The file name, relative to the output directory. The name must not diff --git a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs index b297b44c..83ce4b53 100644 --- a/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs +++ b/buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs @@ -2,8 +2,6 @@ // source: google/protobuf/compiler/plugin.proto /// The version number of protocol compiler. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -307,8 +305,6 @@ pub const __VERSION_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::ty text_merge: ::buffa::type_registry::any_merge_text::, }; /// An encoded CodeGeneratorRequest is written to the plugin's stdin. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -703,8 +699,6 @@ pub const __CODE_GENERATOR_REQUEST_TEXT_ANY: ::buffa::type_registry::TextAnyEntr text_merge: ::buffa::type_registry::any_merge_text::, }; /// The plugin writes an encoded CodeGeneratorResponse to stdout. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -1245,8 +1239,6 @@ pub mod code_generator_response { } } /// Represents a single generated file. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] diff --git a/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs b/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs index b4619ec5..8fb07431 100644 --- a/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs +++ b/buffa-descriptor/src/generated/google.protobuf.descriptor.__view.rs @@ -3,8 +3,6 @@ /// The protocol compiler can output a FileDescriptorSet containing the .proto /// files it parses. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileDescriptorSetView<'a> { /// Field 1: `file` @@ -278,8 +276,6 @@ impl ::serde::Serialize for FileDescriptorSetOwnedView { } } /// Describes a complete .proto file. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileDescriptorProtoView<'a> { /// file name, relative to root of source tree @@ -1142,8 +1138,6 @@ impl ::serde::Serialize for FileDescriptorProtoOwnedView { } } /// Describes a message type. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DescriptorProtoView<'a> { /// Field 1: `name` @@ -1868,7 +1862,6 @@ impl ::serde::Serialize for DescriptorProtoOwnedView { pub mod descriptor_proto { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ExtensionRangeView<'a> { /// Inclusive. @@ -2227,8 +2220,6 @@ pub mod descriptor_proto { /// Range of reserved tag numbers. Reserved tag numbers may not be used by /// fields or extension ranges in the same message. Reserved ranges may /// not overlap. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ReservedRangeView<'a> { /// Inclusive. @@ -2518,7 +2509,6 @@ pub mod descriptor_proto { } } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ExtensionRangeOptionsView<'a> { /// The parser stores options it doesn't recognize here. See above. @@ -2981,7 +2971,6 @@ impl ::serde::Serialize for ExtensionRangeOptionsOwnedView { pub mod extension_range_options { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DeclarationView<'a> { /// The extension number declared within the extension range. @@ -3369,8 +3358,6 @@ pub mod extension_range_options { } } /// Describes a field within a message. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FieldDescriptorProtoView<'a> { /// Field 1: `name` @@ -4018,8 +4005,6 @@ impl ::serde::Serialize for FieldDescriptorProtoOwnedView { } } /// Describes a oneof. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct OneofDescriptorProtoView<'a> { /// Field 1: `name` @@ -4333,8 +4318,6 @@ impl ::serde::Serialize for OneofDescriptorProtoOwnedView { } } /// Describes an enum type. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumDescriptorProtoView<'a> { /// Field 1: `name` @@ -4835,8 +4818,6 @@ pub mod enum_descriptor_proto { /// Note that this is distinct from DescriptorProto.ReservedRange in that it /// is inclusive such that it can appropriately represent the entire int32 /// domain. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumReservedRangeView<'a> { /// Inclusive. @@ -5129,8 +5110,6 @@ pub mod enum_descriptor_proto { } } /// Describes a value within an enum. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumValueDescriptorProtoView<'a> { /// Field 1: `name` @@ -5470,8 +5449,6 @@ impl ::serde::Serialize for EnumValueDescriptorProtoOwnedView { } } /// Describes a service. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ServiceDescriptorProtoView<'a> { /// Field 1: `name` @@ -5837,8 +5814,6 @@ impl ::serde::Serialize for ServiceDescriptorProtoOwnedView { } } /// Describes a method of a service. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct MethodDescriptorProtoView<'a> { /// Field 1: `name` @@ -6292,8 +6267,6 @@ impl ::serde::Serialize for MethodDescriptorProtoOwnedView { /// /// If this turns out to be popular, a web service will be set up /// to automatically assign option numbers. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FileOptionsView<'a> { /// Sets the Java package where classes generated from this .proto will be @@ -7280,7 +7253,6 @@ impl ::serde::Serialize for FileOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct MessageOptionsView<'a> { /// Set true to use the old proto1 MessageSet wire format for extensions. @@ -7891,7 +7863,6 @@ impl ::serde::Serialize for MessageOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FieldOptionsView<'a> { /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. @@ -8792,7 +8763,6 @@ impl ::serde::Serialize for FieldOptionsOwnedView { pub mod field_options { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EditionDefaultView<'a> { /// Field 3: `edition` @@ -9090,8 +9060,6 @@ pub mod field_options { } } /// Information about the support window of a feature. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSupportView<'a> { /// The edition that this feature was first available in. In editions @@ -9495,7 +9463,6 @@ pub mod field_options { } } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct OneofOptionsView<'a> { /// Any features defined in the specific edition. @@ -9839,7 +9806,6 @@ impl ::serde::Serialize for OneofOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumOptionsView<'a> { /// Set this option to true to allow mapping different tag names to the same @@ -10292,7 +10258,6 @@ impl ::serde::Serialize for EnumOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EnumValueOptionsView<'a> { /// Is this enum value deprecated? @@ -10767,7 +10732,6 @@ impl ::serde::Serialize for EnumValueOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ServiceOptionsView<'a> { /// Any features defined in the specific edition. @@ -11157,7 +11121,6 @@ impl ::serde::Serialize for ServiceOptionsOwnedView { ::serde::Serialize::serialize(&self.0, __s) } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct MethodOptionsView<'a> { /// Note: Field numbers 1 through 32 are reserved for Google's internal RPC @@ -11592,8 +11555,6 @@ impl ::serde::Serialize for MethodOptionsOwnedView { /// options protos in descriptor objects (e.g. returned by Descriptor::options(), /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions /// in them. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct UninterpretedOptionView<'a> { /// Field 2: `name` @@ -12046,8 +12007,6 @@ pub mod uninterpreted_option { /// extension (denoted with parentheses in options specs in .proto files). /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents /// "foo.(bar.baz).moo". - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct NamePartView<'a> { /// Field 1: `name_part` @@ -12350,8 +12309,6 @@ Distinguishes a field that was absent from one explicitly encoded with its defau /// readability, but leave us very open to this scenario. A future feature will /// be designed and implemented to handle this, hopefully before we ever hit a /// conflict here. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSetView<'a> { /// Field 1: `field_presence` @@ -12897,7 +12854,6 @@ impl ::serde::Serialize for FeatureSetOwnedView { pub mod feature_set { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct VisibilityFeatureView<'a> { pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>, @@ -13137,8 +13093,6 @@ pub mod feature_set { /// messages are generated from FeatureSet extensions and can be used to seed /// feature resolution. The resolution with this object becomes a simple search /// for the closest matching edition, followed by proto merges. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSetDefaultsView<'a> { /// Field 1: `defaults` @@ -13508,8 +13462,6 @@ pub mod feature_set_defaults { /// defaults. Not all editions may be contained here. For a given edition, /// the defaults at the closest matching edition ordered at or before it should /// be used. This field must be in strict ascending order by edition. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FeatureSetEditionDefaultView<'a> { /// Field 3: `edition` @@ -13938,8 +13890,6 @@ pub mod feature_set_defaults { /// /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct SourceCodeInfoView<'a> { /// A Location identifies a piece of source code in a .proto file which @@ -14305,7 +14255,6 @@ impl ::serde::Serialize for SourceCodeInfoOwnedView { pub mod source_code_info { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct LocationView<'a> { /// Identifies which part of the FileDescriptorProto was defined at this @@ -14898,8 +14847,6 @@ pub mod source_code_info { /// Describes the relationship between generated code and its original source /// file. A GeneratedCodeInfo message is associated with only one generated /// source file, but may contain references to different source .proto files. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct GeneratedCodeInfoView<'a> { /// An Annotation connects some span of text in generated code to an element @@ -15181,7 +15128,6 @@ impl ::serde::Serialize for GeneratedCodeInfoOwnedView { pub mod generated_code_info { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct AnnotationView<'a> { /// Identifies the element in the original source .proto file. This field diff --git a/buffa-descriptor/src/generated/google.protobuf.descriptor.rs b/buffa-descriptor/src/generated/google.protobuf.descriptor.rs index 7c8c62cc..c4e8e730 100644 --- a/buffa-descriptor/src/generated/google.protobuf.descriptor.rs +++ b/buffa-descriptor/src/generated/google.protobuf.descriptor.rs @@ -410,8 +410,6 @@ impl ::buffa::Enumeration for SymbolVisibility { } /// The protocol compiler can output a FileDescriptorSet containing the .proto /// files it parses. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -734,8 +732,6 @@ pub const __FILE_DESCRIPTOR_SET_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a complete .proto file. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -1556,8 +1552,6 @@ pub const __FILE_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a message type. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -2209,7 +2203,6 @@ pub const __DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = :: pub mod descriptor_proto { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -2477,8 +2470,6 @@ pub mod descriptor_proto { /// Range of reserved tag numbers. Reserved tag numbers may not be used by /// fields or extension ranges in the same message. Reserved ranges may /// not overlap. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -2713,7 +2704,6 @@ pub mod descriptor_proto { #[doc(inline)] pub use super::__buffa::view::descriptor_proto::ReservedRangeOwnedView; } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -3414,7 +3404,6 @@ pub mod extension_range_options { &[Self::DECLARATION, Self::UNVERIFIED] } } - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -3796,8 +3785,6 @@ pub mod extension_range_options { pub use super::__buffa::view::extension_range_options::DeclarationOwnedView; } /// Describes a field within a message. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -4930,8 +4917,6 @@ pub mod field_descriptor_proto { } } /// Describes a oneof. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -5154,8 +5139,6 @@ pub const __ONEOF_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEntr text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes an enum type. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -5580,8 +5563,6 @@ pub mod enum_descriptor_proto { /// Note that this is distinct from DescriptorProto.ReservedRange in that it /// is inclusive such that it can appropriately represent the entire int32 /// domain. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -5811,8 +5792,6 @@ pub mod enum_descriptor_proto { pub use super::__buffa::view::enum_descriptor_proto::EnumReservedRangeOwnedView; } /// Describes a value within an enum. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -6074,8 +6053,6 @@ pub const __ENUM_VALUE_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAn text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a service. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -6345,8 +6322,6 @@ pub const __SERVICE_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEn text_merge: ::buffa::type_registry::any_merge_text::, }; /// Describes a method of a service. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -6790,8 +6765,6 @@ pub const __METHOD_DESCRIPTOR_PROTO_TEXT_ANY: ::buffa::type_registry::TextAnyEnt /// /// If this turns out to be popular, a web service will be set up /// to automatically assign option numbers. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -8561,7 +8534,6 @@ pub mod file_options { } } } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -9293,7 +9265,6 @@ pub const __MESSAGE_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::b text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -11205,7 +11176,6 @@ pub mod field_options { ] } } - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -11448,8 +11418,6 @@ pub mod field_options { text_merge: ::buffa::type_registry::any_merge_text::, }; /// Information about the support window of a feature. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -11830,7 +11798,6 @@ pub mod field_options { #[doc(inline)] pub use super::__buffa::view::field_options::FeatureSupportOwnedView; } -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -12216,7 +12183,6 @@ pub const __ONEOF_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buf text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -12781,7 +12747,6 @@ pub const __ENUM_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -13339,7 +13304,6 @@ pub const __ENUM_VALUE_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -13788,7 +13752,6 @@ pub const __SERVICE_OPTIONS_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::b text_encode: ::buffa::type_registry::any_encode_text::, text_merge: ::buffa::type_registry::any_merge_text::, }; -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -14488,8 +14451,6 @@ pub mod method_options { /// options protos in descriptor objects (e.g. returned by Descriptor::options(), /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions /// in them. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -14961,8 +14922,6 @@ pub mod uninterpreted_option { /// extension (denoted with parentheses in options specs in .proto files). /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents /// "foo.(bar.baz).moo". - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -15164,8 +15123,6 @@ pub mod uninterpreted_option { /// readability, but leave us very open to this scenario. A future feature will /// be designed and implemented to handle this, hopefully before we ever hit a /// conflict here. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -17164,7 +17121,6 @@ pub mod feature_set { &[Self::ENFORCE_NAMING_STYLE_UNKNOWN, Self::STYLE2024, Self::STYLE_LEGACY] } } - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -17511,8 +17467,6 @@ pub mod feature_set { /// messages are generated from FeatureSet extensions and can be used to seed /// feature resolution. The resolution with this object becomes a simple search /// for the closest matching edition, followed by proto merges. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -17820,8 +17774,6 @@ pub mod feature_set_defaults { /// defaults. Not all editions may be contained here. For a given edition, /// the defaults at the closest matching edition ordered at or before it should /// be used. This field must be in strict ascending order by edition. - /// - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -18123,8 +18075,6 @@ pub mod feature_set_defaults { /// /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize))] #[cfg_attr(feature = "json", serde(default))] @@ -18497,7 +18447,6 @@ pub const __SOURCE_CODE_INFO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = :: pub mod source_code_info { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -19010,8 +18959,6 @@ pub mod source_code_info { /// Describes the relationship between generated code and its original source /// file. A GeneratedCodeInfo message is associated with only one generated /// source file, but may contain references to different source .proto files. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] @@ -19202,7 +19149,6 @@ pub const __GENERATED_CODE_INFO_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = pub mod generated_code_info { #[allow(unused_imports)] use super::*; - /// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "json", derive(::serde::Serialize, ::serde::Deserialize))] #[cfg_attr(feature = "json", serde(default))] diff --git a/buffa-types/src/generated/google.protobuf.any.__view.rs b/buffa-types/src/generated/google.protobuf.any.__view.rs index aaa92166..11738529 100644 --- a/buffa-types/src/generated/google.protobuf.any.__view.rs +++ b/buffa-types/src/generated/google.protobuf.any.__view.rs @@ -98,8 +98,6 @@ /// "value": "1.212s" /// } /// ``` -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct AnyView<'a> { /// A URL/resource name that uniquely identifies the type of the serialized diff --git a/buffa-types/src/generated/google.protobuf.any.rs b/buffa-types/src/generated/google.protobuf.any.rs index 7972f58b..30eda240 100644 --- a/buffa-types/src/generated/google.protobuf.any.rs +++ b/buffa-types/src/generated/google.protobuf.any.rs @@ -98,8 +98,6 @@ /// "value": "1.212s" /// } /// ``` -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Any { diff --git a/buffa-types/src/generated/google.protobuf.duration.__view.rs b/buffa-types/src/generated/google.protobuf.duration.__view.rs index 1956d326..e6588216 100644 --- a/buffa-types/src/generated/google.protobuf.duration.__view.rs +++ b/buffa-types/src/generated/google.protobuf.duration.__view.rs @@ -65,8 +65,6 @@ /// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 /// microsecond should be expressed in JSON format as "3.000001s". -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DurationView<'a> { /// Signed seconds of the span of time. Must be from -315,576,000,000 diff --git a/buffa-types/src/generated/google.protobuf.duration.rs b/buffa-types/src/generated/google.protobuf.duration.rs index a27a449a..2f016288 100644 --- a/buffa-types/src/generated/google.protobuf.duration.rs +++ b/buffa-types/src/generated/google.protobuf.duration.rs @@ -65,8 +65,6 @@ /// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 /// microsecond should be expressed in JSON format as "3.000001s". -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Duration { diff --git a/buffa-types/src/generated/google.protobuf.empty.__view.rs b/buffa-types/src/generated/google.protobuf.empty.__view.rs index 26d359ab..704561b3 100644 --- a/buffa-types/src/generated/google.protobuf.empty.__view.rs +++ b/buffa-types/src/generated/google.protobuf.empty.__view.rs @@ -10,8 +10,6 @@ /// ```text /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); /// ``` -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct EmptyView<'a> { pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>, diff --git a/buffa-types/src/generated/google.protobuf.empty.rs b/buffa-types/src/generated/google.protobuf.empty.rs index a3fabc7e..62ada694 100644 --- a/buffa-types/src/generated/google.protobuf.empty.rs +++ b/buffa-types/src/generated/google.protobuf.empty.rs @@ -10,8 +10,6 @@ /// ```text /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); /// ``` -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Empty { diff --git a/buffa-types/src/generated/google.protobuf.field_mask.__view.rs b/buffa-types/src/generated/google.protobuf.field_mask.__view.rs index 6d0e9b85..31741ba8 100644 --- a/buffa-types/src/generated/google.protobuf.field_mask.__view.rs +++ b/buffa-types/src/generated/google.protobuf.field_mask.__view.rs @@ -224,8 +224,6 @@ /// The implementation of any API method which has a FieldMask type field in the /// request should verify the included field paths, and return an /// `INVALID_ARGUMENT` error if any path is unmappable. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FieldMaskView<'a> { /// The set of field mask paths. diff --git a/buffa-types/src/generated/google.protobuf.field_mask.rs b/buffa-types/src/generated/google.protobuf.field_mask.rs index aaba286b..0d996116 100644 --- a/buffa-types/src/generated/google.protobuf.field_mask.rs +++ b/buffa-types/src/generated/google.protobuf.field_mask.rs @@ -224,8 +224,6 @@ /// The implementation of any API method which has a FieldMask type field in the /// request should verify the included field paths, and return an /// `INVALID_ARGUMENT` error if any path is unmappable. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct FieldMask { diff --git a/buffa-types/src/generated/google.protobuf.struct.__view.rs b/buffa-types/src/generated/google.protobuf.struct.__view.rs index 8f3a82fe..f416bcbf 100644 --- a/buffa-types/src/generated/google.protobuf.struct.__view.rs +++ b/buffa-types/src/generated/google.protobuf.struct.__view.rs @@ -9,8 +9,6 @@ /// with the proto support for the language. /// /// The JSON representation for `Struct` is JSON object. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct StructView<'a> { /// Unordered map of dynamically typed values. @@ -396,8 +394,6 @@ const _: () = { /// variants. Absence of any variant indicates an error. /// /// The JSON representation for `Value` is JSON value. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ValueView<'a> { pub kind: ::core::option::Option< @@ -1010,8 +1006,6 @@ const _: () = { /// `ListValue` is a wrapper around a repeated field of values. /// /// The JSON representation for `ListValue` is JSON array. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct ListValueView<'a> { /// Repeated field of dynamically typed values. diff --git a/buffa-types/src/generated/google.protobuf.struct.rs b/buffa-types/src/generated/google.protobuf.struct.rs index f4eb70f0..c39e25b6 100644 --- a/buffa-types/src/generated/google.protobuf.struct.rs +++ b/buffa-types/src/generated/google.protobuf.struct.rs @@ -55,8 +55,6 @@ impl ::buffa::Enumeration for NullValue { /// with the proto support for the language. /// /// The JSON representation for `Struct` is JSON object. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Struct { @@ -345,8 +343,6 @@ pub const __STRUCT_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::typ /// variants. Absence of any variant indicates an error. /// /// The JSON representation for `Value` is JSON value. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Value { @@ -909,8 +905,6 @@ pub mod value { /// `ListValue` is a wrapper around a repeated field of values. /// /// The JSON representation for `ListValue` is JSON array. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct ListValue { diff --git a/buffa-types/src/generated/google.protobuf.timestamp.__view.rs b/buffa-types/src/generated/google.protobuf.timestamp.__view.rs index 54cf9d8e..dbbc94a6 100644 --- a/buffa-types/src/generated/google.protobuf.timestamp.__view.rs +++ b/buffa-types/src/generated/google.protobuf.timestamp.__view.rs @@ -102,8 +102,6 @@ /// the Joda Time's \[`ISODateTimeFormat.dateTime()`\]( /// ) /// ) to obtain a formatter capable of generating timestamps in this format. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct TimestampView<'a> { /// Represents seconds of UTC time since Unix epoch diff --git a/buffa-types/src/generated/google.protobuf.timestamp.rs b/buffa-types/src/generated/google.protobuf.timestamp.rs index 4c1c8a26..6d31ccce 100644 --- a/buffa-types/src/generated/google.protobuf.timestamp.rs +++ b/buffa-types/src/generated/google.protobuf.timestamp.rs @@ -102,8 +102,6 @@ /// the Joda Time's \[`ISODateTimeFormat.dateTime()`\]( /// ) /// ) to obtain a formatter capable of generating timestamps in this format. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Timestamp { diff --git a/buffa-types/src/generated/google.protobuf.wrappers.__view.rs b/buffa-types/src/generated/google.protobuf.wrappers.__view.rs index 302ddac5..88ebff4d 100644 --- a/buffa-types/src/generated/google.protobuf.wrappers.__view.rs +++ b/buffa-types/src/generated/google.protobuf.wrappers.__view.rs @@ -4,8 +4,6 @@ /// Wrapper message for `double`. /// /// The JSON representation for `DoubleValue` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct DoubleValueView<'a> { /// The double value. @@ -311,8 +309,6 @@ const _: () = { /// Wrapper message for `float`. /// /// The JSON representation for `FloatValue` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct FloatValueView<'a> { /// The float value. @@ -618,8 +614,6 @@ const _: () = { /// Wrapper message for `int64`. /// /// The JSON representation for `Int64Value` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct Int64ValueView<'a> { /// The int64 value. @@ -925,8 +919,6 @@ const _: () = { /// Wrapper message for `uint64`. /// /// The JSON representation for `UInt64Value` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct UInt64ValueView<'a> { /// The uint64 value. @@ -1232,8 +1224,6 @@ const _: () = { /// Wrapper message for `int32`. /// /// The JSON representation for `Int32Value` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct Int32ValueView<'a> { /// The int32 value. @@ -1539,8 +1529,6 @@ const _: () = { /// Wrapper message for `uint32`. /// /// The JSON representation for `UInt32Value` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct UInt32ValueView<'a> { /// The uint32 value. @@ -1846,8 +1834,6 @@ const _: () = { /// Wrapper message for `bool`. /// /// The JSON representation for `BoolValue` is JSON `true` and `false`. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct BoolValueView<'a> { /// The bool value. @@ -2153,8 +2139,6 @@ const _: () = { /// Wrapper message for `string`. /// /// The JSON representation for `StringValue` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct StringValueView<'a> { /// The string value. @@ -2460,8 +2444,6 @@ const _: () = { /// Wrapper message for `bytes`. /// /// The JSON representation for `BytesValue` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, Debug, Default)] pub struct BytesValueView<'a> { /// The bytes value. diff --git a/buffa-types/src/generated/google.protobuf.wrappers.rs b/buffa-types/src/generated/google.protobuf.wrappers.rs index 61382876..f350d9a1 100644 --- a/buffa-types/src/generated/google.protobuf.wrappers.rs +++ b/buffa-types/src/generated/google.protobuf.wrappers.rs @@ -4,8 +4,6 @@ /// Wrapper message for `double`. /// /// The JSON representation for `DoubleValue` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct DoubleValue { @@ -238,8 +236,6 @@ pub const __DOUBLE_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `float`. /// /// The JSON representation for `FloatValue` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct FloatValue { @@ -472,8 +468,6 @@ pub const __FLOAT_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa /// Wrapper message for `int64`. /// /// The JSON representation for `Int64Value` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Int64Value { @@ -706,8 +700,6 @@ pub const __INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa: /// Wrapper message for `uint64`. /// /// The JSON representation for `UInt64Value` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct UInt64Value { @@ -940,8 +932,6 @@ pub const __U_INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `int32`. /// /// The JSON representation for `Int32Value` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct Int32Value { @@ -1174,8 +1164,6 @@ pub const __INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa: /// Wrapper message for `uint32`. /// /// The JSON representation for `UInt32Value` is JSON number. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct UInt32Value { @@ -1408,8 +1396,6 @@ pub const __U_INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `bool`. /// /// The JSON representation for `BoolValue` is JSON `true` and `false`. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct BoolValue { @@ -1642,8 +1628,6 @@ pub const __BOOL_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa: /// Wrapper message for `string`. /// /// The JSON representation for `StringValue` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct StringValue { @@ -1876,8 +1860,6 @@ pub const __STRING_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buff /// Wrapper message for `bytes`. /// /// The JSON representation for `BytesValue` is JSON string. -/// -/// Generated struct evolution policy: generated message and view structs may gain fields when the proto schema or buffa's internal bookkeeping changes. Construct values by decoding, by starting from `Default::default()` and setting fields, or by using generated setters where available. Avoid exhaustive struct literals or destructuring; exhaustive field lists are not covered by buffa's semver guarantees. #[derive(Clone, PartialEq, Default)] #[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))] pub struct BytesValue { diff --git a/buffa/src/message.rs b/buffa/src/message.rs index 4bce3cf7..a6db97f6 100644 --- a/buffa/src/message.rs +++ b/buffa/src/message.rs @@ -185,6 +185,28 @@ impl<'a> DecodeContext<'a> { /// in the message — so messages can be placed in an `Arc` and shared across /// threads freely. `merge` requires `&mut self`, so mutation is exclusive. /// +/// # Struct evolution policy +/// +/// Generated message structs (and their [`MessageView`](crate::MessageView) / +/// [`LazyMessageView`](crate::LazyMessageView) counterparts) may gain fields +/// across releases — both when the source `.proto` schema evolves and when +/// buffa adds internal bookkeeping such as `__buffa_unknown_fields` or the +/// required-field presence bitmaps. **Exhaustive struct literals and +/// exhaustive destructuring patterns are not covered by buffa's semver +/// guarantees**: code that names every field will fail to compile when a field +/// is added, and that breakage is not considered a breaking change. +/// +/// The forward-compatible ways to construct a generated struct are: +/// +/// - decode it from bytes; +/// - struct-update syntax over the default: `Foo { x, y, ..Default::default() }`; +/// - start from `Foo::default()` and assign fields (or call generated `with_*` +/// setters when `generate_with_setters` is enabled). +/// +/// The structs are deliberately *not* `#[non_exhaustive]`, so struct-update +/// syntax remains available from downstream crates; this policy is a documented +/// contract rather than a compiler-enforced one. +/// /// [`SizeCache`]: crate::SizeCache pub trait Message: DefaultInstance + Clone + PartialEq + Send + Sync { /// Compute the encoded byte size of this message, recording nested diff --git a/buffa/src/view.rs b/buffa/src/view.rs index 08248f91..afc3a58c 100644 --- a/buffa/src/view.rs +++ b/buffa/src/view.rs @@ -111,6 +111,9 @@ use bytes::{BufMut, Bytes}; /// /// The lifetime `'a` ties the view to the input buffer — the view cannot /// outlive the buffer it was decoded from. +/// +/// Generated view structs may gain fields across releases; see the +/// [struct evolution policy on `Message`](crate::Message#struct-evolution-policy). pub trait MessageView<'a>: Sized { /// The corresponding owned message type. type Owned: crate::Message; @@ -931,6 +934,9 @@ impl Eq for MessageFieldView {} /// [`LazyMessageFieldView`] / [`LazyRepeatedView`]) and decoded only on /// access. Deferred validation is therefore visible in the type and trait /// bound — generic code over `MessageView` never silently inherits it. +/// +/// Generated lazy-view structs may gain fields across releases; see the +/// [struct evolution policy on `Message`](crate::Message#struct-evolution-policy). pub trait LazyMessageView<'a>: Sized { /// The corresponding owned message type. type Owned: crate::Message; diff --git a/docs/guide.md b/docs/guide.md index a0f0a7d3..437bea10 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -675,9 +675,11 @@ Key design choices: - **`__buffa_unknown_fields`** preserves fields from newer schema versions - **Struct evolution policy**: generated message and view structs may gain fields as schemas evolve or buffa adds internal bookkeeping. Construct values - by decoding, starting from `Default::default()` and setting fields, or using - generated setters where available; exhaustive struct literals and - destructuring are not covered by buffa's semver guarantees. + by decoding, with `Foo { x, ..Default::default() }`, or by starting from + `Foo::default()` and assigning fields; exhaustive struct literals and + destructuring are not covered by buffa's semver guarantees. See the + [`Message` trait documentation](https://docs.rs/buffa/latest/buffa/trait.Message.html#struct-evolution-policy) + for the full policy. - **Module nesting** for nested message types (`outer::Inner`, not `OuterInner`) - **No serialization state** — sizes live in an external [`SizeCache`](https://docs.rs/buffa/latest/buffa/struct.SizeCache.html), so the struct holds only its proto fields plus the unknown-fields plumbing, with no interior mutability