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
impl Copy for SyntaxError
impl Eq for SyntaxError
impl StructuralPartialEq for SyntaxError
Auto Trait Implementations§
impl Freeze for SyntaxError
impl RefUnwindSafe for SyntaxError
impl Send for SyntaxError
impl Sync for SyntaxError
impl Unpin for SyntaxError
impl UnwindSafe for SyntaxError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)