pub enum XmlSafetyError {
InvalidPolicy,
InputTooLarge,
OutputTooLarge,
ExternalEntity,
TooDeep,
TooManyElements,
TooManyAttributes,
TextTooLarge,
TooManyEvents,
InvalidEncoding,
Malformed,
}Expand description
Failures produced while applying an XmlSafetyPolicy.
Variants§
InvalidPolicy
One or more configured limits are zero.
InputTooLarge
The input is larger than the configured byte limit.
OutputTooLarge
Generated XML exceeds the configured byte limit.
ExternalEntity
The input declares a DTD or custom entity while declarations are prohibited.
TooDeep
The element nesting depth exceeds the configured limit.
TooManyElements
The total element count exceeds the configured limit.
TooManyAttributes
An element has more attributes than the configured limit.
TextTooLarge
The total decoded text and CDATA size exceeds the configured limit.
TooManyEvents
The parser emitted more events than the configured limit.
InvalidEncoding
The document contains bytes that are not valid in its declared encoding.
Malformed
The input is not one complete, well-formed, single-root XML document.
Trait Implementations§
Source§impl Clone for XmlSafetyError
impl Clone for XmlSafetyError
Source§fn clone(&self) -> XmlSafetyError
fn clone(&self) -> XmlSafetyError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for XmlSafetyError
impl Debug for XmlSafetyError
Source§impl Display for XmlSafetyError
impl Display for XmlSafetyError
Source§impl Error for XmlSafetyError
impl Error for XmlSafetyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<XmlSafetyError> for Error
impl From<XmlSafetyError> for Error
Source§fn from(error: XmlSafetyError) -> Self
fn from(error: XmlSafetyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for XmlSafetyError
impl PartialEq for XmlSafetyError
Source§fn eq(&self, other: &XmlSafetyError) -> bool
fn eq(&self, other: &XmlSafetyError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for XmlSafetyError
impl Eq for XmlSafetyError
impl StructuralPartialEq for XmlSafetyError
Auto Trait Implementations§
impl Freeze for XmlSafetyError
impl RefUnwindSafe for XmlSafetyError
impl Send for XmlSafetyError
impl Sync for XmlSafetyError
impl Unpin for XmlSafetyError
impl UnsafeUnpin for XmlSafetyError
impl UnwindSafe for XmlSafetyError
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
Mutably borrows from an owned value. Read more