#[non_exhaustive]pub enum ErrorKind {
Show 91 variants
TooManyComments,
InputIo {
error: InputIoError,
},
InputDecoding {
message: String,
},
InputByteLimitExceeded {
limit: usize,
},
UnexpectedEofFlowSequence,
UnexpectedEofFlowMapping,
UnexpectedEofImplicitFlowMapping,
UnexpectedEofBlockSequence,
UnexpectedEofBlockMapping,
UnexpectedEof,
ExpectedStreamStart,
DuplicateVersionDirective,
UnsupportedYamlMajorVersion,
DuplicateTagDirective,
ExpectedDocumentStart,
MissingDocumentEndBeforeDirective,
AnchorCountOverflow,
UnknownAnchor,
ExpectedNodeContent,
ExpectedBlockMappingKey,
ExpectedFlowMappingSeparator,
ExpectedFlowSequenceSeparator,
ExpectedBlockSequenceEntry,
UndeclaredTagHandle,
MissingIncludeResolver,
Custom(String),
MultipleDocumentsUnsupported,
InputOffsetsWithoutSlice,
InputSlicingUnavailable,
ExpectedTagBang,
ExpectedTagDirectiveBang,
InvalidGlobalTagCharacter,
SimpleKeyExpected,
InvalidSimpleKey,
InvalidDocumentEnd,
InvalidIndentation,
BomInsideDocument,
UnexpectedCharacter {
character: char,
},
TabNotAllowed,
TabInBlockIndentation,
CommentInterceptedScalar,
ExpectedWhitespace,
CommentNotSeparated,
InvalidDirectiveTerminator,
MissingYamlVersionSeparator,
MissingDirectiveName,
InvalidDirectiveName,
YamlVersionTooLong,
MissingYamlVersion,
InvalidTagDirectiveTerminator,
InvalidTagTerminator,
MissingTagUri,
UnclosedVerbatimTag,
InvalidTagEscape,
InvalidTagUtf8LeadingByte,
InvalidTagUtf8TrailingByte,
InvalidTagUtf8,
MissingAnchorOrAliasName,
MisplacedFlowCollectionEnd,
MismatchedFlowCollectionEnd {
open: char,
close: char,
},
UnclosedFlowCollection {
open: char,
},
RecursionLimitExceeded,
BlockEntryInFlowCollection,
BlockSequenceEntryNotAllowed,
InvalidBlockEntryWhitespace,
ZeroBlockScalarIndent,
InvalidBlockScalarHeader,
TabAtBlockScalarStart,
InvalidBlockScalarIndent,
DocumentIndicatorInQuotedScalar,
UnclosedQuotedScalar,
TabInIndentation,
InvalidQuotedScalarIndent,
InvalidTrailingSingleQuotedScalar,
InvalidTrailingDoubleQuotedScalar,
UnknownQuotedScalarEscape,
InvalidQuotedScalarHexEscape,
InvalidLowSurrogateHexEscape,
InvalidLowSurrogate,
MissingLowSurrogate,
UnpairedLowSurrogate,
InvalidUnicodeEscape,
InvalidFlowScalarIndent,
PlainScalarStartsWithDashFlowIndicator,
TabInPlainScalar,
UnexpectedEndOfPlainScalar,
MappingKeyNotAllowed,
FlowMappingValueAdjacentCollection,
InvalidMappingValueWhitespace,
InvalidColonPlacement,
MappingValueNotAllowed,
}Expand description
Machine-readable category for a ScanError.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TooManyComments
Too many consecutive comments were buffered before a collection entry.
InputIo
Reading from the input source failed.
Fields
error: InputIoErrorPortable details and, with the std feature, an optional retained I/O error.
InputDecoding
The input source was not valid text in the adapter’s expected encoding.
InputByteLimitExceeded
The raw input exceeded a configured byte limit.
UnexpectedEofFlowSequence
Input ended while parsing a flow sequence.
UnexpectedEofFlowMapping
Input ended while parsing a flow mapping.
UnexpectedEofImplicitFlowMapping
Input ended while parsing an implicit flow mapping.
UnexpectedEofBlockSequence
Input ended while parsing a block sequence.
UnexpectedEofBlockMapping
Input ended while parsing a block mapping.
UnexpectedEof
Input ended unexpectedly in another parser state.
ExpectedStreamStart
A stream-start token was expected.
DuplicateVersionDirective
More than one YAML version directive was found for a document.
UnsupportedYamlMajorVersion
The YAML major version is unsupported.
DuplicateTagDirective
A tag directive handle was declared more than once for a document.
ExpectedDocumentStart
A document-start token was expected.
MissingDocumentEndBeforeDirective
A directive followed an implicit document without an explicit document end.
AnchorCountOverflow
The parser ran out of representable anchor identifiers.
UnknownAnchor
An alias referred to an unknown anchor.
ExpectedNodeContent
The parser did not find expected node content.
ExpectedBlockMappingKey
A block mapping key was expected.
ExpectedFlowMappingSeparator
A flow mapping separator or closing brace was expected.
ExpectedFlowSequenceSeparator
A flow sequence separator or closing bracket was expected.
ExpectedBlockSequenceEntry
A block sequence entry indicator was expected.
UndeclaredTagHandle
A tag used a handle that was not declared.
MissingIncludeResolver
No include resolver was configured for a parser stack.
Custom(String)
An error supplied by an external parser adapter or resolver.
MultipleDocumentsUnsupported
A parser-stack entry contained multiple documents where only one is supported.
InputOffsetsWithoutSlice
An input advertised byte offsets but did not provide the requested slice.
An input advertised slicing but did not provide the requested slice.
ExpectedTagBang
A tag did not begin with the expected exclamation mark.
ExpectedTagDirectiveBang
A tag directive handle did not end with the expected exclamation mark.
InvalidGlobalTagCharacter
A global tag started with an invalid character.
SimpleKeyExpected
A required simple key was not followed by a value indicator.
InvalidSimpleKey
A previously saved simple key was no longer valid.
InvalidDocumentEnd
Invalid content followed a document-end marker.
InvalidIndentation
Indentation was invalid for the current parser context.
BomInsideDocument
A byte-order mark appeared inside a document.
UnexpectedCharacter
An unexpected reserved character was encountered.
TabNotAllowed
A tab was used in a context where it is not allowed.
TabInBlockIndentation
A tab was used in block indentation.
CommentInterceptedScalar
A comment interrupted a multiline plain scalar.
ExpectedWhitespace
Required whitespace was not found.
CommentNotSeparated
A comment was not separated from the preceding token by whitespace.
InvalidDirectiveTerminator
A directive did not end with a comment or line break.
MissingYamlVersionSeparator
A YAML version directive did not contain the expected digit or dot.
MissingDirectiveName
A directive name was missing.
InvalidDirectiveName
A directive name contained an invalid character.
YamlVersionTooLong
A YAML version component exceeded the supported length.
MissingYamlVersion
A YAML version component was missing.
InvalidTagDirectiveTerminator
A tag directive did not end with whitespace or a line break.
InvalidTagTerminator
A tag token did not end with valid separation whitespace.
MissingTagUri
A tag URI was missing.
UnclosedVerbatimTag
A verbatim tag was missing its closing angle bracket.
InvalidTagEscape
A tag contained an invalid percent escape.
InvalidTagUtf8LeadingByte
A tag escape started with an invalid UTF-8 byte.
InvalidTagUtf8TrailingByte
A tag escape contained an invalid trailing UTF-8 byte.
InvalidTagUtf8
A tag escape did not decode to one valid Unicode scalar value.
MissingAnchorOrAliasName
An anchor or alias name was missing.
MisplacedFlowCollectionEnd
A flow collection closing bracket was misplaced.
MismatchedFlowCollectionEnd
A flow collection was closed with the wrong bracket type.
Fields
UnclosedFlowCollection
A flow collection was not closed.
RecursionLimitExceeded
The supported flow nesting limit was exceeded.
BlockEntryInFlowCollection
A block entry indicator appeared inside a flow collection.
BlockSequenceEntryNotAllowed
A block sequence entry appeared in a context that does not allow it.
InvalidBlockEntryWhitespace
A block entry indicator was followed by invalid whitespace.
ZeroBlockScalarIndent
A block scalar used an indentation indicator of zero.
InvalidBlockScalarHeader
A block scalar header did not end with a comment or line break.
TabAtBlockScalarStart
Block scalar content began with a tab.
InvalidBlockScalarIndent
A block scalar content line had invalid indentation.
DocumentIndicatorInQuotedScalar
A document indicator appeared inside a quoted scalar.
UnclosedQuotedScalar
A quoted scalar was not closed.
TabInIndentation
A tab was used as indentation.
InvalidQuotedScalarIndent
A multiline quoted scalar had invalid indentation.
InvalidTrailingSingleQuotedScalar
Invalid content followed a single-quoted scalar.
InvalidTrailingDoubleQuotedScalar
Invalid content followed a double-quoted scalar.
UnknownQuotedScalarEscape
A quoted scalar contained an unknown escape character.
InvalidQuotedScalarHexEscape
A quoted scalar escape did not contain the expected hexadecimal digits.
InvalidLowSurrogateHexEscape
A low-surrogate escape did not contain the expected hexadecimal digits.
InvalidLowSurrogate
A surrogate pair contained an invalid low surrogate.
MissingLowSurrogate
A high surrogate was not followed by a low surrogate.
UnpairedLowSurrogate
A low surrogate appeared without a preceding high surrogate.
InvalidUnicodeEscape
A quoted scalar escape did not represent a valid Unicode scalar value.
InvalidFlowScalarIndent
A flow scalar started at invalid indentation.
PlainScalarStartsWithDashFlowIndicator
A plain scalar began with a dash followed by a flow indicator.
TabInPlainScalar
A tab appeared where a plain scalar could not accept it.
UnexpectedEndOfPlainScalar
A plain scalar ended before consuming any content.
MappingKeyNotAllowed
A mapping key appeared in a context that does not allow one.
FlowMappingValueAdjacentCollection
A flow mapping value indicator was adjacent to a collection start.
InvalidMappingValueWhitespace
A mapping value indicator was followed by invalid whitespace.
InvalidColonPlacement
A value indicator was placed illegally in an implicit flow mapping.
MappingValueNotAllowed
A mapping value appeared in a context that does not allow one.