Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions buffa-codegen/src/impl_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ pub fn generate_message_impl(
}
}

impl ::buffa::MessageFullName for #name_ident {
const FULL_NAME: &'static str = #proto_fqn;
}

impl ::buffa::Message for #name_ident {
/// Returns the total encoded size in bytes.
///
Expand Down
12 changes: 12 additions & 0 deletions buffa-descriptor/src/generated/google.protobuf.compiler.plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ impl ::buffa::DefaultInstance for Version {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for Version {
const FULL_NAME: &'static str = "google.protobuf.compiler.Version";
}
impl ::buffa::Message for Version {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -255,6 +258,9 @@ impl ::buffa::DefaultInstance for CodeGeneratorRequest {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for CodeGeneratorRequest {
const FULL_NAME: &'static str = "google.protobuf.compiler.CodeGeneratorRequest";
}
impl ::buffa::Message for CodeGeneratorRequest {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -512,6 +518,9 @@ impl ::buffa::DefaultInstance for CodeGeneratorResponse {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for CodeGeneratorResponse {
const FULL_NAME: &'static str = "google.protobuf.compiler.CodeGeneratorResponse";
}
impl ::buffa::Message for CodeGeneratorResponse {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -832,6 +841,9 @@ pub mod code_generator_response {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for File {
const FULL_NAME: &'static str = "google.protobuf.compiler.CodeGeneratorResponse.File";
}
impl ::buffa::Message for File {
/// Returns the total encoded size in bytes.
///
Expand Down
102 changes: 102 additions & 0 deletions buffa-descriptor/src/generated/google.protobuf.descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ impl ::buffa::DefaultInstance for FileDescriptorSet {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FileDescriptorSet {
const FULL_NAME: &'static str = "google.protobuf.FileDescriptorSet";
}
impl ::buffa::Message for FileDescriptorSet {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -385,6 +388,9 @@ impl ::buffa::DefaultInstance for FileDescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FileDescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.FileDescriptorProto";
}
impl ::buffa::Message for FileDescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -913,6 +919,9 @@ impl ::buffa::DefaultInstance for DescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for DescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.DescriptorProto";
}
impl ::buffa::Message for DescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -1326,6 +1335,9 @@ pub mod descriptor_proto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for ExtensionRange {
const FULL_NAME: &'static str = "google.protobuf.DescriptorProto.ExtensionRange";
}
impl ::buffa::Message for ExtensionRange {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -1491,6 +1503,9 @@ pub mod descriptor_proto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for ReservedRange {
const FULL_NAME: &'static str = "google.protobuf.DescriptorProto.ReservedRange";
}
impl ::buffa::Message for ReservedRange {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -1636,6 +1651,9 @@ impl ::buffa::DefaultInstance for ExtensionRangeOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for ExtensionRangeOptions {
const FULL_NAME: &'static str = "google.protobuf.ExtensionRangeOptions";
}
impl ::buffa::Message for ExtensionRangeOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -1911,6 +1929,9 @@ pub mod extension_range_options {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for Declaration {
const FULL_NAME: &'static str = "google.protobuf.ExtensionRangeOptions.Declaration";
}
impl ::buffa::Message for Declaration {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -2188,6 +2209,9 @@ impl ::buffa::DefaultInstance for FieldDescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FieldDescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.FieldDescriptorProto";
}
impl ::buffa::Message for FieldDescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -2749,6 +2773,9 @@ impl ::buffa::DefaultInstance for OneofDescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for OneofDescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.OneofDescriptorProto";
}
impl ::buffa::Message for OneofDescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -2914,6 +2941,9 @@ impl ::buffa::DefaultInstance for EnumDescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for EnumDescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.EnumDescriptorProto";
}
impl ::buffa::Message for EnumDescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -3180,6 +3210,9 @@ pub mod enum_descriptor_proto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for EnumReservedRange {
const FULL_NAME: &'static str = "google.protobuf.EnumDescriptorProto.EnumReservedRange";
}
impl ::buffa::Message for EnumReservedRange {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -3311,6 +3344,9 @@ impl ::buffa::DefaultInstance for EnumValueDescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for EnumValueDescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.EnumValueDescriptorProto";
}
impl ::buffa::Message for EnumValueDescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -3477,6 +3513,9 @@ impl ::buffa::DefaultInstance for ServiceDescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for ServiceDescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.ServiceDescriptorProto";
}
impl ::buffa::Message for ServiceDescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -3668,6 +3707,9 @@ impl ::buffa::DefaultInstance for MethodDescriptorProto {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for MethodDescriptorProto {
const FULL_NAME: &'static str = "google.protobuf.MethodDescriptorProto";
}
impl ::buffa::Message for MethodDescriptorProto {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -4082,6 +4124,9 @@ impl ::buffa::DefaultInstance for FileOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FileOptions {
const FULL_NAME: &'static str = "google.protobuf.FileOptions";
}
impl ::buffa::Message for FileOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -4844,6 +4889,9 @@ impl ::buffa::DefaultInstance for MessageOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for MessageOptions {
const FULL_NAME: &'static str = "google.protobuf.MessageOptions";
}
impl ::buffa::Message for MessageOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -5204,6 +5252,9 @@ impl ::buffa::DefaultInstance for FieldOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FieldOptions {
const FULL_NAME: &'static str = "google.protobuf.FieldOptions";
}
impl ::buffa::Message for FieldOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -5944,6 +5995,9 @@ pub mod field_options {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for EditionDefault {
const FULL_NAME: &'static str = "google.protobuf.FieldOptions.EditionDefault";
}
impl ::buffa::Message for EditionDefault {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -6106,6 +6160,9 @@ pub mod field_options {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FeatureSupport {
const FULL_NAME: &'static str = "google.protobuf.FieldOptions.FeatureSupport";
}
impl ::buffa::Message for FeatureSupport {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -6315,6 +6372,9 @@ impl ::buffa::DefaultInstance for OneofOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for OneofOptions {
const FULL_NAME: &'static str = "google.protobuf.OneofOptions";
}
impl ::buffa::Message for OneofOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -6495,6 +6555,9 @@ impl ::buffa::DefaultInstance for EnumOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for EnumOptions {
const FULL_NAME: &'static str = "google.protobuf.EnumOptions";
}
impl ::buffa::Message for EnumOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -6731,6 +6794,9 @@ impl ::buffa::DefaultInstance for EnumValueOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for EnumValueOptions {
const FULL_NAME: &'static str = "google.protobuf.EnumValueOptions";
}
impl ::buffa::Message for EnumValueOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -6971,6 +7037,9 @@ impl ::buffa::DefaultInstance for ServiceOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for ServiceOptions {
const FULL_NAME: &'static str = "google.protobuf.ServiceOptions";
}
impl ::buffa::Message for ServiceOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -7161,6 +7230,9 @@ impl ::buffa::DefaultInstance for MethodOptions {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for MethodOptions {
const FULL_NAME: &'static str = "google.protobuf.MethodOptions";
}
impl ::buffa::Message for MethodOptions {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -7436,6 +7508,9 @@ impl ::buffa::DefaultInstance for UninterpretedOption {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for UninterpretedOption {
const FULL_NAME: &'static str = "google.protobuf.UninterpretedOption";
}
impl ::buffa::Message for UninterpretedOption {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -7700,6 +7775,9 @@ pub mod uninterpreted_option {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for NamePart {
const FULL_NAME: &'static str = "google.protobuf.UninterpretedOption.NamePart";
}
impl ::buffa::Message for NamePart {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -7849,6 +7927,9 @@ impl ::buffa::DefaultInstance for FeatureSet {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FeatureSet {
const FULL_NAME: &'static str = "google.protobuf.FeatureSet";
}
impl ::buffa::Message for FeatureSet {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -8499,6 +8580,9 @@ pub mod feature_set {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for VisibilityFeature {
const FULL_NAME: &'static str = "google.protobuf.FeatureSet.VisibilityFeature";
}
impl ::buffa::Message for VisibilityFeature {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -8678,6 +8762,9 @@ impl ::buffa::DefaultInstance for FeatureSetDefaults {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FeatureSetDefaults {
const FULL_NAME: &'static str = "google.protobuf.FeatureSetDefaults";
}
impl ::buffa::Message for FeatureSetDefaults {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -8866,6 +8953,9 @@ pub mod feature_set_defaults {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for FeatureSetEditionDefault {
const FULL_NAME: &'static str = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault";
}
impl ::buffa::Message for FeatureSetEditionDefault {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -9091,6 +9181,9 @@ impl ::buffa::DefaultInstance for SourceCodeInfo {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for SourceCodeInfo {
const FULL_NAME: &'static str = "google.protobuf.SourceCodeInfo";
}
impl ::buffa::Message for SourceCodeInfo {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -9303,6 +9396,9 @@ pub mod source_code_info {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for Location {
const FULL_NAME: &'static str = "google.protobuf.SourceCodeInfo.Location";
}
impl ::buffa::Message for Location {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -9580,6 +9676,9 @@ impl ::buffa::DefaultInstance for GeneratedCodeInfo {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for GeneratedCodeInfo {
const FULL_NAME: &'static str = "google.protobuf.GeneratedCodeInfo";
}
impl ::buffa::Message for GeneratedCodeInfo {
/// Returns the total encoded size in bytes.
///
Expand Down Expand Up @@ -9720,6 +9819,9 @@ pub mod generated_code_info {
VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
}
}
impl ::buffa::MessageFullName for Annotation {
const FULL_NAME: &'static str = "google.protobuf.GeneratedCodeInfo.Annotation";
}
impl ::buffa::Message for Annotation {
/// Returns the total encoded size in bytes.
///
Expand Down
Loading