#[repr(i32)]pub enum Syntax {
SYNTAX_PROTO2 = 0,
SYNTAX_PROTO3 = 1,
SYNTAX_EDITIONS = 2,
}Expand description
The syntax in which a protocol buffer element is defined.
Variants§
SYNTAX_PROTO2 = 0
Syntax proto2.
SYNTAX_PROTO3 = 1
Syntax proto3.
SYNTAX_EDITIONS = 2
Syntax editions.
Implementations§
Source§impl Syntax
impl Syntax
Sourcepub const Proto2: Self = Self::SYNTAX_PROTO2
pub const Proto2: Self = Self::SYNTAX_PROTO2
Idiomatic alias for Self::SYNTAX_PROTO2; Debug prints the variant name.
Sourcepub const Proto3: Self = Self::SYNTAX_PROTO3
pub const Proto3: Self = Self::SYNTAX_PROTO3
Idiomatic alias for Self::SYNTAX_PROTO3; Debug prints the variant name.
Sourcepub const Editions: Self = Self::SYNTAX_EDITIONS
pub const Editions: Self = Self::SYNTAX_EDITIONS
Idiomatic alias for Self::SYNTAX_EDITIONS; Debug prints the variant name.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for Syntax
Available on crate feature arbitrary only.
impl<'arbitrary> Arbitrary<'arbitrary> for Syntax
Available on crate feature
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreimpl Copy for Syntax
Source§impl Enumeration for Syntax
impl Enumeration for Syntax
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
The name of this enum variant as it appears in the
.proto file.impl Eq for Syntax
impl StructuralPartialEq for Syntax
Auto Trait Implementations§
impl Freeze for Syntax
impl RefUnwindSafe for Syntax
impl Send for Syntax
impl Sync for Syntax
impl Unpin for Syntax
impl UnsafeUnpin for Syntax
impl UnwindSafe for Syntax
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