pub enum XmlError {
Show 16 variants
InvalidEof(&'static str),
UndeclaredEntity,
InvalidChar(&'static str, u32, bool),
UnexpectedChar(&'static str, char, Option<&'static [&'static str]>),
UnexpectedByte(&'static str, u8, Option<&'static [&'static str]>),
InvalidSyntax(&'static str),
UnexpectedToken(&'static str, &'static str, Option<&'static [&'static str]>),
DuplicateAttribute,
ElementMismatch,
MultiColonName(&'static str),
EmptyNamePart(&'static str),
UndeclaredNamespacePrefix(&'static str),
ReservedNamespacePrefix,
ReservedNamespaceName,
InvalidLocalName(&'static str),
EmptyNamespaceUri,
}
Expand description
Violation of a well-formedness or namespace-well-formedness constraint or the XML 1.0 grammar.
Variants§
InvalidEof(&'static str)
End-of-file encountered during a construct where more data was expected.
The contents are implementation details.
UndeclaredEntity
Attempt to refer to an undeclared entity.
Note: May also be emitted in some cases of malformed entities as the lexer is very conservative about how many chars are read to interpret an entity.
InvalidChar(&'static str, u32, bool)
Unicode codepoint which is not allowed in XML 1.0 encountered.
The contents are implementation details.
UnexpectedChar(&'static str, char, Option<&'static [&'static str]>)
Unicode codepoint which was not expected at that point in the grammar.
The contents are implementation details.
UnexpectedByte(&'static str, u8, Option<&'static [&'static str]>)
Byte which was not expected at that point in the grammar.
The contents are implementation details.
InvalidSyntax(&'static str)
Generalized invalid syntactic construct which does not fit into any of the other categories.
The contents are implementation details.
UnexpectedToken(&'static str, &'static str, Option<&'static [&'static str]>)
Token was not expected by the parser at that point in the grammar.
The contents are implementation details.
DuplicateAttribute
Attribute was declared multiple times in the same element.
Note: This will also be emitted for namespaced attributes which
resolve to the same (uri, localname)
pair after prefix resolution.
ElementMismatch
Ending tag name does not match opening tag.
MultiColonName(&'static str)
More than one colon encountered in a name.
The contents are implementation details.
EmptyNamePart(&'static str)
One side of the colon in a name was empty.
The contents are implementation details.
UndeclaredNamespacePrefix(&'static str)
Use of an undeclared namespace prefix.
The contents are implementation details.
ReservedNamespacePrefix
Attempt to redefine a reserved namespace prefix.
ReservedNamespaceName
Attempt to bind a reserved namespace name to the wrong prefix.
InvalidLocalName(&'static str)
Local name does not conform to Name production (invalid start char)
EmptyNamespaceUri
Declared namespace URI is empty
Trait Implementations§
source§impl Error for XmlError
impl Error for XmlError
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<Error> for XmlError
impl From<Error> for XmlError
source§fn from(other: ValidationError) -> Self
fn from(other: ValidationError) -> Self
source§impl PartialEq for XmlError
impl PartialEq for XmlError
impl Copy for XmlError
impl StructuralPartialEq for XmlError
Auto Trait Implementations§
impl Freeze for XmlError
impl RefUnwindSafe for XmlError
impl Send for XmlError
impl Sync for XmlError
impl Unpin for XmlError
impl UnwindSafe for XmlError
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> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString
. Read more