Stubs

Module

stubs/wellknowntypes

The Protobuf well-known types (google/protobuf/*.proto), from Google's protobuf releases.

OfficialPublic

Message in pb

CppFeatures

pb.CppFeatures

Fields

FieldTypeNumberDescription
legacy_closed_enumoptionalbool1

Whether or not to treat an enum field as closed. This option is only applicable to enum fields, and will be removed in the future. It is consistent with the legacy behavior of using proto3 enum types for proto2 fields.

  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_FIELD, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "true" edition: EDITION_LEGACY }, { value: "false" edition: EDITION_PROTO3 }];
  • option 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" };
string_typeoptionalStringType2
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_FIELD, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "STRING" edition: EDITION_LEGACY }, { value: "VIEW" edition: EDITION_2024 }];
  • option feature_support = { edition_introduced: EDITION_2023 };
enum_name_uses_string_viewoptionalbool3
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_ENUM, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "false" edition: EDITION_LEGACY }, { value: "true" edition: EDITION_2024 }];
  • option feature_support = { edition_introduced: EDITION_2024 };
repeated_typeoptionalRepeatedType4
  • option retention = RETENTION_RUNTIME;
  • option targets = [TARGET_TYPE_FIELD, TARGET_TYPE_FILE];
  • option edition_defaults = [{ value: "LEGACY" edition: EDITION_LEGACY }];
  • option feature_support = { edition_introduced: EDITION_UNSTABLE };

Nested enums

Used by

Defined in google/protobuf/cpp_features.proto