pub enum SyntaxError {
InvalidBangMarkup,
UnclosedPIOrXmlDecl,
UnclosedComment,
UnclosedDoctype,
UnclosedCData,
UnclosedTag,
}
Expand description
An error returned if parsed document does not correspond to the XML grammar,
for example, a tag opened by <
not closed with >
. This error does not
represent invalid XML constructs, for example, tags <>
and </>
a well-formed
from syntax point-of-view.
Variants§
InvalidBangMarkup
The parser started to parse <!
, but the input ended before it can recognize
anything.
UnclosedPIOrXmlDecl
The parser started to parse processing instruction or XML declaration (<?
),
but the input ended before the ?>
sequence was found.
UnclosedComment
The parser started to parse comment (<!--
) content, but the input ended
before the -->
sequence was found.
UnclosedDoctype
The parser started to parse DTD (<!DOCTYPE
) content, but the input ended
before the closing >
character was found.
UnclosedCData
The parser started to parse <![CDATA[
content, but the input ended
before the ]]>
sequence was found.
UnclosedTag
The parser started to parse tag content, but the input ended
before the closing >
character was found.
Trait Implementations§
Source§impl Clone for SyntaxError
impl Clone for SyntaxError
Source§fn clone(&self) -> SyntaxError
fn clone(&self) -> SyntaxError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SyntaxError
impl Debug for SyntaxError
Source§impl Display for SyntaxError
impl Display for SyntaxError
Source§impl Error for SyntaxError
impl Error for SyntaxError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<SyntaxError> for Error
impl From<SyntaxError> for Error
Source§fn from(error: SyntaxError) -> Self
fn from(error: SyntaxError) -> Self
Creates a new Error::Syntax
from the given error