pub enum Error {
CloseElement,
CloseNamespace,
OpenNamespaceWithoutElement,
WriteWithoutElement,
WriteAllEof,
ParsingUtf8,
InvalidCdata,
InvalidComment,
InvalidEncoding,
InvalidName,
InvalidAttrValue,
}Expand description
Things that may go wrong during creation of the XML.
Variants§
CloseElement
Closing an elemtent without having one opened.
CloseNamespace
Closing a namespace without having one opened.
OpenNamespaceWithoutElement
Opening a namespace without having an element.
WriteWithoutElement
Attempt to write without having an element opened.
WriteAllEof
Writing the buffer failed.
ParsingUtf8
Conversion of buffer into String failed.
InvalidCdata
CDATA content contains the illegal sequence ]]>.
InvalidComment
Comment content contains the illegal sequence --.
InvalidEncoding
Encoding name is not valid per the XML specification.
InvalidName
Element or attribute name is not a valid XML name.
InvalidAttrValue
Attribute value contains a character that would produce malformed XML.
Use attr_esc to write a value containing ", <, or &.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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