pub enum ProtobufElementType {
Show 21 variants
Root,
Whitespace,
Newline,
Comment,
Error,
Eof,
SyntaxDef,
PackageDef,
ImportDef,
OptionDef,
MessageDef,
EnumDef,
ServiceDef,
RpcDef,
FieldDef,
MapFieldDef,
OneofDef,
Identifier,
StringLiteral,
NumberLiteral,
BooleanLiteral,
}Expand description
Element types for the Protobuf language.
Variants§
Root
Root node.
Whitespace
Whitespace.
Newline
Newline.
Comment
Comment.
Error
Error node.
Eof
End of stream.
SyntaxDef
Syntax definition.
PackageDef
Package definition.
ImportDef
Import definition.
OptionDef
Option definition.
MessageDef
Message definition.
EnumDef
Enum definition.
ServiceDef
Service definition.
RpcDef
RPC definition.
FieldDef
Field definition.
MapFieldDef
Map field definition.
OneofDef
Oneof definition.
Identifier
Identifier.
StringLiteral
String literal.
NumberLiteral
Number literal.
BooleanLiteral
Boolean literal.
Trait Implementations§
Source§impl Clone for ProtobufElementType
impl Clone for ProtobufElementType
Source§fn clone(&self) -> ProtobufElementType
fn clone(&self) -> ProtobufElementType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtobufElementType
impl Debug for ProtobufElementType
Source§impl<'de> Deserialize<'de> for ProtobufElementType
impl<'de> Deserialize<'de> for ProtobufElementType
Source§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 ElementType for ProtobufElementType
impl ElementType for ProtobufElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this element matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalElementRole) -> bool
fn is_universal(&self, role: UniversalElementRole) -> bool
Returns true if this element matches the specified universal role.
Source§impl From<ProtobufTokenType> for ProtobufElementType
impl From<ProtobufTokenType> for ProtobufElementType
Source§fn from(token: ProtobufTokenType) -> Self
fn from(token: ProtobufTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for ProtobufElementType
impl Hash for ProtobufElementType
Source§impl PartialEq for ProtobufElementType
impl PartialEq for ProtobufElementType
Source§impl Serialize for ProtobufElementType
impl Serialize for ProtobufElementType
impl Copy for ProtobufElementType
impl Eq for ProtobufElementType
impl StructuralPartialEq for ProtobufElementType
Auto Trait Implementations§
impl Freeze for ProtobufElementType
impl RefUnwindSafe for ProtobufElementType
impl Send for ProtobufElementType
impl Sync for ProtobufElementType
impl Unpin for ProtobufElementType
impl UnsafeUnpin for ProtobufElementType
impl UnwindSafe for ProtobufElementType
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