pub enum Error {
Show 48 variants AbruptClosingOfEmptyComment, AbruptDoctypePublicIdentifier, AbruptDoctypeSystemIdentifier, AbsenceOfDigitsInNumericCharacterReference, CdataInHtmlContent, CharacterReferenceOutsideUnicodeRange, ControlCharacterReference, EndTagWithAttributes, EndTagWithTrailingSolidus, EofBeforeTagName, EofInCdata, EofInComment, EofInDoctype, EofInScriptHtmlCommentLikeText, EofInTag, IncorrectlyClosedComment, IncorrectlyOpenedComment, InvalidCharacterSequenceAfterDoctypeName, InvalidFirstCharacterOfTagName, MissingAttributeValue, MissingDoctypeName, MissingDoctypePublicIdentifier, MissingDoctypeSystemIdentifier, MissingEndTagName, MissingQuoteBeforeDoctypePublicIdentifier, MissingQuoteBeforeDoctypeSystemIdentifier, MissingSemicolonAfterCharacterReference, MissingWhitespaceAfterDoctypePublicKeyword, MissingWhitespaceAfterDoctypeSystemKeyword, MissingWhitespaceBeforeDoctypeName, MissingWhitespaceBetweenAttributes, MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers, NestedComment, NoncharacterCharacterReference, NoncharacterInInputStream, NullCharacterReference, SurrogateCharacterReference, SurrogateInInputStream, UnexpectedCharacterAfterDoctypeSystemIdentifier, UnexpectedCharacterInAttributeName, UnexpectedCharacterInUnquotedAttributeValue, UnexpectedEqualsSignBeforeAttributeName, UnexpectedNullCharacter, UnexpectedQuestionMarkInsteadOfTagName, UnexpectedSolidusInTag, UnknownNamedCharacterReference, DuplicateAttribute, ControlCharacterInInputStream,
}
Expand description

All parse errors this tokenizer can emit.

Variants§

§

AbruptClosingOfEmptyComment

This error corresponds to the abrupt-closing-of-empty-comment error found in the WHATWG spec.

§

AbruptDoctypePublicIdentifier

This error corresponds to the abrupt-doctype-public-identifier error found in the WHATWG spec.

§

AbruptDoctypeSystemIdentifier

This error corresponds to the abrupt-doctype-system-identifier error found in the WHATWG spec.

§

AbsenceOfDigitsInNumericCharacterReference

This error corresponds to the absence-of-digits-in-numeric-character-reference error found in the WHATWG spec.

§

CdataInHtmlContent

This error corresponds to the cdata-in-html-content error found in the WHATWG spec.

§

CharacterReferenceOutsideUnicodeRange

This error corresponds to the character-reference-outside-unicode-range error found in the WHATWG spec.

§

ControlCharacterReference

This error corresponds to the control-character-reference error found in the WHATWG spec.

§

EndTagWithAttributes

This error corresponds to the end-tag-with-attributes error found in the WHATWG spec.

§

EndTagWithTrailingSolidus

This error corresponds to the end-tag-with-trailing-solidus error found in the WHATWG spec.

§

EofBeforeTagName

This error corresponds to the eof-before-tag-name error found in the WHATWG spec.

§

EofInCdata

This error corresponds to the eof-in-cdata error found in the WHATWG spec.

§

EofInComment

This error corresponds to the eof-in-comment error found in the WHATWG spec.

§

EofInDoctype

This error corresponds to the eof-in-doctype error found in the WHATWG spec.

§

EofInScriptHtmlCommentLikeText

This error corresponds to the eof-in-script-html-comment-like-text error found in the WHATWG spec.

§

EofInTag

This error corresponds to the eof-in-tag error found in the WHATWG spec.

§

IncorrectlyClosedComment

This error corresponds to the incorrectly-closed-comment error found in the WHATWG spec.

§

IncorrectlyOpenedComment

This error corresponds to the incorrectly-opened-comment error found in the WHATWG spec.

§

InvalidCharacterSequenceAfterDoctypeName

This error corresponds to the invalid-character-sequence-after-doctype-name error found in the WHATWG spec.

§

InvalidFirstCharacterOfTagName

This error corresponds to the invalid-first-character-of-tag-name error found in the WHATWG spec.

§

MissingAttributeValue

This error corresponds to the missing-attribute-value error found in the WHATWG spec.

§

MissingDoctypeName

This error corresponds to the missing-doctype-name error found in the WHATWG spec.

§

MissingDoctypePublicIdentifier

This error corresponds to the missing-doctype-public-identifier error found in the WHATWG spec.

§

MissingDoctypeSystemIdentifier

This error corresponds to the missing-doctype-system-identifier error found in the WHATWG spec.

§

MissingEndTagName

This error corresponds to the missing-end-tag-name error found in the WHATWG spec.

§

MissingQuoteBeforeDoctypePublicIdentifier

This error corresponds to the missing-quote-before-doctype-public-identifier error found in the WHATWG spec.

§

MissingQuoteBeforeDoctypeSystemIdentifier

This error corresponds to the missing-quote-before-doctype-system-identifier error found in the WHATWG spec.

§

MissingSemicolonAfterCharacterReference

This error corresponds to the missing-semicolon-after-character-reference error found in the WHATWG spec.

§

MissingWhitespaceAfterDoctypePublicKeyword

This error corresponds to the missing-whitespace-after-doctype-public-keyword error found in the WHATWG spec.

§

MissingWhitespaceAfterDoctypeSystemKeyword

This error corresponds to the missing-whitespace-after-doctype-system-keyword error found in the WHATWG spec.

§

MissingWhitespaceBeforeDoctypeName

This error corresponds to the missing-whitespace-before-doctype-name error found in the WHATWG spec.

§

MissingWhitespaceBetweenAttributes

This error corresponds to the missing-whitespace-between-attributes error found in the WHATWG spec.

§

MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers

This error corresponds to the missing-whitespace-between-doctype-public-and-system-identifiers error found in the WHATWG spec.

§

NestedComment

This error corresponds to the nested-comment error found in the WHATWG spec.

§

NoncharacterCharacterReference

This error corresponds to the noncharacter-character-reference error found in the WHATWG spec.

§

NoncharacterInInputStream

This error corresponds to the noncharacter-in-input-stream error found in the WHATWG spec.

§

NullCharacterReference

This error corresponds to the null-character-reference error found in the WHATWG spec.

§

SurrogateCharacterReference

This error corresponds to the surrogate-character-reference error found in the WHATWG spec.

§

SurrogateInInputStream

This error corresponds to the surrogate-in-input-stream error found in the WHATWG spec.

§

UnexpectedCharacterAfterDoctypeSystemIdentifier

This error corresponds to the unexpected-character-after-doctype-system-identifier error found in the WHATWG spec.

§

UnexpectedCharacterInAttributeName

This error corresponds to the unexpected-character-in-attribute-name error found in the WHATWG spec.

§

UnexpectedCharacterInUnquotedAttributeValue

This error corresponds to the unexpected-character-in-unquoted-attribute-value error found in the WHATWG spec.

§

UnexpectedEqualsSignBeforeAttributeName

This error corresponds to the unexpected-equals-sign-before-attribute-name error found in the WHATWG spec.

§

UnexpectedNullCharacter

This error corresponds to the unexpected-null-character error found in the WHATWG spec.

§

UnexpectedQuestionMarkInsteadOfTagName

This error corresponds to the unexpected-question-mark-instead-of-tag-name error found in the WHATWG spec.

§

UnexpectedSolidusInTag

This error corresponds to the unexpected-solidus-in-tag error found in the WHATWG spec.

§

UnknownNamedCharacterReference

This error corresponds to the unknown-named-character-reference error found in the WHATWG spec.

§

DuplicateAttribute

This error corresponds to the duplicate-attribute error found in the WHATWG spec.

§

ControlCharacterInInputStream

This error corresponds to the control-character-in-input-stream error found in the WHATWG spec.

Implementations§

source§

impl Error

source

pub fn code(&self) -> &'static str

Returns the kebap-case error code as defined in the WHATWG spec.

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromStr for Error

source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parse a kebap-case error code as typically written in the WHATWG spec into an enum variant.

§

type Err = ()

The associated error which can be returned from parsing.
source§

impl PartialEq for Error

source§

fn eq(&self, other: &Error) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Error

source§

impl StructuralEq for Error

source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.