pub enum TokenKind {
Eof,
Name,
Scalar,
MessageOpen,
MessageClose,
ListOpen,
ListClose,
}Available on crate feature
text only.Expand description
The kind of a textproto token.
Colons, commas, and semicolons are consumed by the tokenizer between tokens and are not exposed.
Variants§
Eof
End of input.
Name
A field name: either a bare identifier (foo), a bracketed extension
name ([pkg.ext]), a bracketed Any URL ([type.googleapis.com/Foo]),
or a decimal field number (42).
Scalar
A scalar value: number literal, string literal, enum identifier, or
true/false/inf/nan. Uninterpreted — the decoder parses raw
according to the expected field type.
MessageOpen
{ or < — start of a nested message.
MessageClose
} or > — end of a nested message.
ListOpen
[ — start of a list of scalar or message values.
ListClose
] — end of a list.
Trait Implementations§
impl Copy for TokenKind
impl Eq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Forget for TokenKind
impl Freeze for TokenKind
impl Move for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnsafeUnpin for TokenKind
impl UnwindSafe for TokenKind
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