#[non_exhaustive]pub enum Edition {
Proto2,
Proto3,
Edition2023,
Edition2024,
}Expand description
The edition of a .proto file.
§Variant ordering
Variants are declared in chronological edition order. The derived
PartialOrd / Ord implementations use declaration order, so new
editions must be appended — inserting a variant between existing
ones would silently break edition comparison logic.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Proto2
Proto2 syntax (resolves to proto2 feature defaults).
Proto3
Proto3 syntax (resolves to proto3 feature defaults).
Edition2023
Edition 2023.
Edition2024
Edition 2024.
Trait Implementations§
impl Copy for Edition
impl Eq for Edition
Source§impl Ord for Edition
impl Ord for Edition
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Edition
impl PartialOrd for Edition
impl StructuralPartialEq for Edition
Auto Trait Implementations§
impl Forget for Edition
impl Freeze for Edition
impl Move for Edition
impl RefUnwindSafe for Edition
impl Send for Edition
impl Sync for Edition
impl Unpin for Edition
impl UnsafeUnpin for Edition
impl UnwindSafe for Edition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more