Enum quick_xml::errors::SyntaxError
source · 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
source§impl PartialEq for SyntaxError
impl PartialEq for SyntaxError
source§fn eq(&self, other: &SyntaxError) -> bool
fn eq(&self, other: &SyntaxError) -> bool
self and other values to be equal, and is used
by ==.