pub enum ParseErrorKind {
Show 17 variants
UnexpectedToken,
UnclosedObject,
UnclosedSequence,
MixedSeparators,
InvalidEscape(String),
ExpectedKey,
ExpectedValue,
UnexpectedEof,
DuplicateKey {
original: Span,
},
InvalidTagName,
InvalidKey,
DanglingDocComment,
TooManyAtoms,
ReopenedPath {
closed_path: Vec<String>,
},
NestIntoTerminal {
terminal_path: Vec<String>,
},
CommaInSequence,
MissingWhitespaceBeforeBlock,
}Expand description
Parse error kinds.
Variants§
UnexpectedToken
Unexpected token.
UnclosedObject
Unclosed object (missing }).
UnclosedSequence
Unclosed sequence (missing )).
MixedSeparators
Mixed separators in object (some commas, some newlines).
InvalidEscape(String)
Invalid escape sequence in quoted string.
ExpectedKey
Expected a key.
ExpectedValue
Expected a value.
UnexpectedEof
Unexpected end of input.
DuplicateKey
Duplicate key in object. Contains the span of the first occurrence.
InvalidTagName
Invalid tag name (must match pattern).
InvalidKey
Invalid key (e.g., heredoc used as key).
DanglingDocComment
Dangling doc comment (not followed by entry).
TooManyAtoms
Too many atoms in entry (expected at most 2: key and value).
ReopenedPath
Attempted to reopen a path that was closed when a sibling appeared.
NestIntoTerminal
Attempted to nest into a path that has a terminal value (scalar/sequence/tag/unit).
CommaInSequence
Comma in sequence (sequences are whitespace-separated, not comma-separated).
MissingWhitespaceBeforeBlock
Missing whitespace between bare scalar and { or (.
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§fn clone(&self) -> ParseErrorKind
fn clone(&self) -> ParseErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more