pub enum ParseError {
Show 14 variants
AllocationFailed,
SharedExecution(MemoryError),
BackendUnavailable {
backend: XmlBackend,
},
ByteLimitReached {
maximum: usize,
actual: usize,
},
DtdDetected,
NodesLimitReached,
EntityExpansionLimitReached {
maximum: u32,
actual: u32,
},
EntityExpansionWorkLimitReached {
maximum: usize,
actual: usize,
},
SourcePositionLimitReached {
maximum: usize,
actual: usize,
},
DepthLimitReached {
maximum: usize,
actual: usize,
},
NamespaceBindingLimitReached {
maximum: usize,
actual: usize,
},
SourceMapMismatch {
expected: &'static str,
found: &'static str,
},
Backend {
backend: &'static str,
message: String,
},
BackendDivergence {
reason: String,
},
}Expand description
Stable parser-neutral XML parse error.
Variants§
AllocationFailed
The semantic tree could not acquire its requested allocation.
The current query refused tree construction work or storage.
The requested parser implementation was not compiled into this build.
ByteLimitReached
The absolute source-document byte ceiling was exceeded.
Fields
DtdDetected
A DTD was found while DTD processing was disabled.
NodesLimitReached
The retained semantic node ceiling was exceeded.
EntityExpansionLimitReached
The absolute general-entity substitution ceiling was exceeded.
Fields
EntityExpansionWorkLimitReached
The absolute entity replacement-work ceiling was exceeded.
Fields
SourcePositionLimitReached
The source-position sidecar reached its absolute allocation ceiling.
Fields
DepthLimitReached
The absolute XML element nesting ceiling was exceeded.
Fields
NamespaceBindingLimitReached
The absolute in-scope namespace-binding ceiling was exceeded.
Fields
SourceMapMismatch
A backend node does not match the original lexical source sidecar.
Fields
Backend
The selected backend rejected malformed XML.
Fields
BackendDivergence
The two parsers produced different retained XML semantics.
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
impl Eq for ParseError
Source§impl Error for ParseError
impl Error for ParseError
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
use the Display impl or to_string()
Source§impl From<MemoryError> for ParseError
Available on crate feature xmldsig only.
impl From<MemoryError> for ParseError
xmldsig only.