41 lines
1.4 KiB
Protocol Buffer
41 lines
1.4 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package pb;
|
|
|
|
import "google/protobuf/descriptor.proto";
|
|
|
|
message CppFeatures {
|
|
optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, TARGET_TYPE_FILE, edition_defaults = [value: "true"
|
|
edition: EDITION_LEGACY
|
|
, value: "false"
|
|
edition: EDITION_PROTO3
|
|
], feature_support = edition_introduced: EDITION_2023
|
|
edition_deprecated: EDITION_2023
|
|
deprecation_warning: "The legacy closed enum behavior in C++ is deprecated and is scheduled to be removed in edition 2025. See http://protobuf.dev/programming-guides/enum/#cpp for more information"
|
|
];
|
|
|
|
optional StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, TARGET_TYPE_FILE, edition_defaults = [value: "STRING"
|
|
edition: EDITION_LEGACY
|
|
, value: "VIEW"
|
|
edition: EDITION_2024
|
|
], feature_support = edition_introduced: EDITION_2023
|
|
];
|
|
enum StringType {
|
|
STRING_TYPE_UNKNOWN = 0;
|
|
VIEW = 1;
|
|
CORD = 2;
|
|
STRING = 3;
|
|
}
|
|
|
|
optional bool enum_name_uses_string_view = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, TARGET_TYPE_FILE, edition_defaults = [value: "false"
|
|
edition: EDITION_LEGACY
|
|
, value: "true"
|
|
edition: EDITION_2024
|
|
], feature_support = edition_introduced: EDITION_2024
|
|
];
|
|
}
|
|
|
|
extend google.protobuf.FeatureSet {
|
|
optional CppFeatures cpp = 1000;
|
|
}
|