#[repr(i32)]pub enum Edition {
Show 13 variants
EDITION_UNKNOWN = 0,
EDITION_LEGACY = 900,
EDITION_PROTO2 = 998,
EDITION_PROTO3 = 999,
EDITION_2023 = 1_000,
EDITION_2024 = 1_001,
EDITION_UNSTABLE = 9_999,
EDITION_1_TEST_ONLY = 1,
EDITION_2_TEST_ONLY = 2,
EDITION_99997_TEST_ONLY = 99_997,
EDITION_99998_TEST_ONLY = 99_998,
EDITION_99999_TEST_ONLY = 99_999,
EDITION_MAX = 2_147_483_647,
}Expand description
The full set of known editions.
Variants§
EDITION_UNKNOWN = 0
A placeholder for an unknown edition value.
EDITION_LEGACY = 900
A placeholder edition for specifying default behaviors before a feature was first introduced. This is effectively an “infinite past”.
EDITION_PROTO2 = 998
Legacy syntax “editions”. These pre-date editions, but behave much like distinct editions. These can’t be used to specify the edition of proto files, but feature definitions must supply proto2/proto3 defaults for backwards compatibility.
EDITION_PROTO3 = 999
EDITION_2023 = 1_000
Editions that have been released. The specific values are arbitrary and should not be depended on, but they will always be time-ordered for easy comparison.
EDITION_2024 = 1_001
EDITION_UNSTABLE = 9_999
A placeholder edition for developing and testing unscheduled features.
EDITION_1_TEST_ONLY = 1
Placeholder editions for testing feature resolution. These should not be used or relied on outside of tests.
EDITION_2_TEST_ONLY = 2
EDITION_99997_TEST_ONLY = 99_997
EDITION_99998_TEST_ONLY = 99_998
EDITION_99999_TEST_ONLY = 99_999
EDITION_MAX = 2_147_483_647
Placeholder for specifying unbounded edition support. This should only ever be used by plugins that can expect to never require any changes to support a new edition.
Implementations§
Source§impl Edition
impl Edition
Sourcepub const EditionUnknown: Self = Self::EDITION_UNKNOWN
pub const EditionUnknown: Self = Self::EDITION_UNKNOWN
Idiomatic alias for Self::EDITION_UNKNOWN; Debug prints the variant name.
Sourcepub const EditionLegacy: Self = Self::EDITION_LEGACY
pub const EditionLegacy: Self = Self::EDITION_LEGACY
Idiomatic alias for Self::EDITION_LEGACY; Debug prints the variant name.
Sourcepub const EditionProto2: Self = Self::EDITION_PROTO2
pub const EditionProto2: Self = Self::EDITION_PROTO2
Idiomatic alias for Self::EDITION_PROTO2; Debug prints the variant name.
Sourcepub const EditionProto3: Self = Self::EDITION_PROTO3
pub const EditionProto3: Self = Self::EDITION_PROTO3
Idiomatic alias for Self::EDITION_PROTO3; Debug prints the variant name.
Sourcepub const Edition2023: Self = Self::EDITION_2023
pub const Edition2023: Self = Self::EDITION_2023
Idiomatic alias for Self::EDITION_2023; Debug prints the variant name.
Sourcepub const Edition2024: Self = Self::EDITION_2024
pub const Edition2024: Self = Self::EDITION_2024
Idiomatic alias for Self::EDITION_2024; Debug prints the variant name.
Sourcepub const EditionUnstable: Self = Self::EDITION_UNSTABLE
pub const EditionUnstable: Self = Self::EDITION_UNSTABLE
Idiomatic alias for Self::EDITION_UNSTABLE; Debug prints the variant name.
Sourcepub const Edition1TestOnly: Self = Self::EDITION_1_TEST_ONLY
pub const Edition1TestOnly: Self = Self::EDITION_1_TEST_ONLY
Idiomatic alias for Self::EDITION_1_TEST_ONLY; Debug prints the variant name.
Sourcepub const Edition2TestOnly: Self = Self::EDITION_2_TEST_ONLY
pub const Edition2TestOnly: Self = Self::EDITION_2_TEST_ONLY
Idiomatic alias for Self::EDITION_2_TEST_ONLY; Debug prints the variant name.
Sourcepub const Edition99997TestOnly: Self = Self::EDITION_99997_TEST_ONLY
pub const Edition99997TestOnly: Self = Self::EDITION_99997_TEST_ONLY
Idiomatic alias for Self::EDITION_99997_TEST_ONLY; Debug prints the variant name.
Sourcepub const Edition99998TestOnly: Self = Self::EDITION_99998_TEST_ONLY
pub const Edition99998TestOnly: Self = Self::EDITION_99998_TEST_ONLY
Idiomatic alias for Self::EDITION_99998_TEST_ONLY; Debug prints the variant name.
Sourcepub const Edition99999TestOnly: Self = Self::EDITION_99999_TEST_ONLY
pub const Edition99999TestOnly: Self = Self::EDITION_99999_TEST_ONLY
Idiomatic alias for Self::EDITION_99999_TEST_ONLY; Debug prints the variant name.
Sourcepub const EditionMax: Self = Self::EDITION_MAX
pub const EditionMax: Self = Self::EDITION_MAX
Idiomatic alias for Self::EDITION_MAX; Debug prints the variant name.
Trait Implementations§
Source§impl Enumeration for Edition
impl Enumeration for Edition
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
.proto file.