pub struct Edition(/* private fields */);Expand description
The full set of known editions.
Implementations§
Source§impl Edition
impl Edition
Sourcepub const EDITION_UNKNOWN: Edition
pub const EDITION_UNKNOWN: Edition
A placeholder for an unknown edition value.
Sourcepub const EDITION_LEGACY: Edition
pub const EDITION_LEGACY: Edition
A placeholder edition for specifying default behaviors before a feature was first introduced. This is effectively an “infinite past”.
Sourcepub const EDITION_PROTO2: Edition
pub const EDITION_PROTO2: Edition
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.
pub const EDITION_PROTO3: Edition
Sourcepub const EDITION_2023: Edition
pub const EDITION_2023: Edition
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.
pub const EDITION_2024: Edition
Sourcepub const EDITION_1_TEST_ONLY: Edition
pub const EDITION_1_TEST_ONLY: Edition
Placeholder editions for testing feature resolution. These should not be used or relied on outside of tests.
pub const EDITION_2_TEST_ONLY: Edition
pub const EDITION_99997_TEST_ONLY: Edition
pub const EDITION_99998_TEST_ONLY: Edition
pub const EDITION_99999_TEST_ONLY: Edition
Sourcepub const EDITION_MAX: Edition
pub const EDITION_MAX: Edition
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.
Sourcepub fn as_str_name(&self) -> Cow<'static, str>
pub fn as_str_name(&self) -> Cow<'static, str>
Gets the enum value as a string.
Sourcepub fn from_str_name(name: &str) -> Option<Self>
pub fn from_str_name(name: &str) -> Option<Self>
Creates an enum value from the value name.