pub enum TokenType {
Show 24 variants
StreamStart,
StreamEnd,
DocumentStart,
DocumentEnd,
YamlDirective(u8, u8),
TagDirective(String, String),
BlockSequenceStart,
BlockMappingStart,
BlockEnd,
FlowSequenceStart,
FlowSequenceEnd,
FlowMappingStart,
FlowMappingEnd,
BlockEntry,
FlowEntry,
Key,
Value,
Scalar(String, QuoteStyle),
BlockScalarLiteral(String),
BlockScalarFolded(String),
Alias(String),
Anchor(String),
Tag(String),
Comment(String),
}Expand description
Types of YAML tokens
Variants§
StreamStart
Start of stream
StreamEnd
End of stream
DocumentStart
Document start marker (—)
DocumentEnd
Document end marker (…)
YamlDirective(u8, u8)
YAML version directive (%YAML)
TagDirective(String, String)
Tag directive (%TAG)
BlockSequenceStart
Block sequence start
BlockMappingStart
Block mapping start
BlockEnd
Block end
FlowSequenceStart
Flow sequence start ([)
FlowSequenceEnd
Flow sequence end (])
FlowMappingStart
Flow mapping start ({)
FlowMappingEnd
Flow mapping end (})
BlockEntry
Block entry (-)
FlowEntry
Flow entry (,)
Key
Key indicator (? in complex keys)
Value
Value indicator (:)
Scalar(String, QuoteStyle)
Scalar value with quote style
BlockScalarLiteral(String)
Literal block scalar (|)
BlockScalarFolded(String)
Folded block scalar (>)
Alias(String)
Alias (*name)
Anchor(String)
Anchor (&name)
Tag(String)
Tag (!tag or !!tag)
Comment(String)
Comment (# text)
Trait Implementations§
impl Eq for TokenType
impl StructuralPartialEq for TokenType
Auto Trait Implementations§
impl Freeze for TokenType
impl RefUnwindSafe for TokenType
impl Send for TokenType
impl Sync for TokenType
impl Unpin for TokenType
impl UnwindSafe for TokenType
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.