pub enum TokenKind {
Show 17 variants
Bom,
Whitespace,
Newline,
Comment,
DocumentStart,
DocumentEnd,
Colon,
Dash,
FlowSequenceStart,
FlowSequenceEnd,
FlowMappingStart,
FlowMappingEnd,
Comma,
Question,
DoubleQuotedScalar,
SingleQuotedScalar,
PlainScalar,
}Expand description
Token kinds emitted by the lossless lexer.
Variants§
Bom
UTF-8 byte-order mark at the start of a stream.
Whitespace
Spaces, tabs, or other separation characters that are not line breaks.
Newline
A YAML line break, preserving the original spelling through the span.
Comment
A comment from # through the byte before the line break.
DocumentStart
--- document start marker.
DocumentEnd
... document end marker.
Colon
: mapping value indicator.
Dash
- sequence entry indicator or dash token.
FlowSequenceStart
[ flow sequence start.
FlowSequenceEnd
] flow sequence end.
FlowMappingStart
{ flow mapping start.
FlowMappingEnd
} flow mapping end.
Comma
, flow separator.
Question
? explicit mapping key indicator.
DoubleQuotedScalar
A double-quoted scalar, including its quotes.
SingleQuotedScalar
A single-quoted scalar, including its quotes.
PlainScalar
An unquoted scalar chunk.
Trait Implementations§
impl Copy for TokenKind
impl Eq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze 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