#[non_exhaustive]pub enum ErrorKind {
UnexpectedEof,
UnterminatedComment,
UnterminatedCdata,
UnterminatedTag,
StrayEndTag,
MismatchedEndTag,
ImplicitlyClosed,
UnknownEntity,
BogusComment,
}Expand description
The category of a ParseError.
Marked #[non_exhaustive]: new recovery cases may be added without it being
a breaking change, so always include a _ => arm when matching.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedEof
Input ended in the middle of a construct (tag, attribute, …).
UnterminatedComment
A <!-- comment was never closed with -->.
UnterminatedCdata
A <![CDATA[ section was never closed with ]]>.
UnterminatedTag
A tag was opened with < but never closed with >.
StrayEndTag
An end tag (</x>) had no matching open element and was ignored.
MismatchedEndTag
An end tag closed elements other than the current one (mis-nesting).
ImplicitlyClosed
An element was closed implicitly by another tag or end-of-input.
UnknownEntity
A &entity; reference was not recognised and was left verbatim.
BogusComment
A <! ... > or <? ... > construct was treated as a bogus comment.
Trait Implementations§
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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