#[non_exhaustive]pub enum ParseErrorKind {
Show 50 variants
CdataInHtmlContent,
IncorrectlyOpenedComment,
AbruptClosingOfEmptyComment,
NestedComment,
IncorrectlyClosedComment,
EofInComment,
InvalidFirstCharacterOfTagName,
EofBeforeTagName,
MissingEndTagName,
EofInTag,
EndTagWithAttributes,
EndTagWithTrailingSolidus,
DuplicateAttribute,
UnexpectedNullCharacter,
UnexpectedCharacterInAttributeName,
MissingAttributeValue,
UnexpectedCharacterInUnquotedAttributeValue,
MissingWhitespaceBetweenAttributes,
UnexpectedSolidusInTag,
UnexpectedEqualsSignBeforeAttributeName,
UnknownNamedCharacterReference,
AbsenceOfDigitsInNumericCharacterReference,
MissingSemicolonAfterCharacterReference,
NullCharacterReference,
CharacterReferenceOutsideUnicodeRange,
SurrogateCharacterReference,
NoncharacterCharacterReference,
ControlCharacterReference,
MissingWhitespaceBeforeDoctypeName,
MissingDoctypeName,
InvalidCharacterSequenceAfterDoctypeName,
MissingWhitespaceAfterDoctypePublicKeyword,
MissingWhitespaceAfterDoctypeSystemKeyword,
MissingDoctypePublicIdentifier,
MissingDoctypeSystemIdentifier,
MissingQuoteBeforeDoctypePublicIdentifier,
MissingQuoteBeforeDoctypeSystemIdentifier,
AbruptDoctypePublicIdentifier,
AbruptDoctypeSystemIdentifier,
MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers,
UnexpectedCharacterAfterDoctypeSystemIdentifier,
EofInDoctype,
EofInProcessingInstruction,
InvalidFirstCharacterOfProcessingInstructionTarget,
InvalidProcessingInstructionTarget,
DisallowedProcessingInstructionTarget,
EofInScriptHtmlCommentLikeText,
EofInCdata,
NoncharacterInInputStream,
ControlCharacterInInputStream,
}Expand description
Which WHATWG “parse error” (§13.2.2) occurred. Variant names mirror
the spec’s own kebab-case error identifiers, translated to
PascalCase. Only variants this crate actually detects and reports
exist — no catch-all/string-payload variant, so matching on a
specific kind stays meaningful. #[non_exhaustive] because more
variants are expected in follow-up phases (plan/07-parse-errors.md:
tokenizer-level errors only so far — tree-construction-level errors,
e.g. stray end tags across the whole document, are follow-up work,
not yet represented here) — adding one later must not be a breaking
change for any caller matching on this type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CdataInHtmlContent
IncorrectlyOpenedComment
AbruptClosingOfEmptyComment
NestedComment
IncorrectlyClosedComment
EofInComment
InvalidFirstCharacterOfTagName
EofBeforeTagName
MissingEndTagName
EofInTag
EndTagWithAttributes
EndTagWithTrailingSolidus
DuplicateAttribute
UnexpectedNullCharacter
UnexpectedCharacterInAttributeName
MissingAttributeValue
UnexpectedCharacterInUnquotedAttributeValue
MissingWhitespaceBetweenAttributes
UnexpectedSolidusInTag
UnexpectedEqualsSignBeforeAttributeName
UnknownNamedCharacterReference
AbsenceOfDigitsInNumericCharacterReference
MissingSemicolonAfterCharacterReference
NullCharacterReference
CharacterReferenceOutsideUnicodeRange
SurrogateCharacterReference
NoncharacterCharacterReference
ControlCharacterReference
MissingWhitespaceBeforeDoctypeName
MissingDoctypeName
InvalidCharacterSequenceAfterDoctypeName
MissingWhitespaceAfterDoctypePublicKeyword
MissingWhitespaceAfterDoctypeSystemKeyword
MissingDoctypePublicIdentifier
MissingDoctypeSystemIdentifier
MissingQuoteBeforeDoctypePublicIdentifier
MissingQuoteBeforeDoctypeSystemIdentifier
AbruptDoctypePublicIdentifier
AbruptDoctypeSystemIdentifier
MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers
UnexpectedCharacterAfterDoctypeSystemIdentifier
EofInDoctype
EofInProcessingInstruction
InvalidFirstCharacterOfProcessingInstructionTarget
InvalidProcessingInstructionTarget
DisallowedProcessingInstructionTarget
EofInScriptHtmlCommentLikeText
EofInCdata
NoncharacterInInputStream
ControlCharacterInInputStream
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§fn clone(&self) -> ParseErrorKind
fn clone(&self) -> ParseErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ParseErrorKind
Source§impl Debug for ParseErrorKind
impl Debug for ParseErrorKind
Source§impl Display for ParseErrorKind
impl Display for ParseErrorKind
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
A short, human-readable description — not a transcription of any
particular consumer’s exact wording (e.g. not vnu’s), just a
plain-English description of the WHATWG condition this variant
names. Consumers that need their own phrasing should match on
ParseErrorKind directly instead of parsing this string.