Enum pbjson_types::Edition
source · #[repr(i32)]pub enum Edition {
Unknown = 0,
Legacy = 900,
Proto2 = 998,
Proto3 = 999,
Edition2023 = 1_000,
Edition2024 = 1_001,
Edition1TestOnly = 1,
Edition2TestOnly = 2,
Edition99997TestOnly = 99_997,
Edition99998TestOnly = 99_998,
Edition99999TestOnly = 99_999,
Max = 2_147_483_647,
}
Variants§
Unknown = 0
Legacy = 900
Proto2 = 998
Proto3 = 999
Edition2023 = 1_000
Edition2024 = 1_001
Edition1TestOnly = 1
Edition2TestOnly = 2
Edition99997TestOnly = 99_997
Edition99998TestOnly = 99_998
Edition99999TestOnly = 99_999
Max = 2_147_483_647
Implementations§
source§impl Edition
impl Edition
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
§impl<'de> Deserialize<'de> for Edition
impl<'de> Deserialize<'de> for Edition
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Edition
impl Ord for Edition
source§impl PartialEq for Edition
impl PartialEq for Edition
source§impl PartialOrd for Edition
impl PartialOrd for Edition
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Edition
impl Eq for Edition
impl StructuralPartialEq for Edition
Auto Trait Implementations§
impl Freeze for Edition
impl RefUnwindSafe for Edition
impl Send for Edition
impl Sync for Edition
impl Unpin 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)