pub enum XmlEncodingError {
OddUtf16Length,
InvalidUtf16(FromUtf16Error),
ConflictingDeclaration(String),
MissingUtf16Declaration,
InvalidUtf8(Utf8Error),
}Expand description
Error returned when XML octets cannot be decoded as required by XML 1.0.
Variants§
OddUtf16Length
A BOM-marked UTF-16 document ended in a partial code unit.
InvalidUtf16(FromUtf16Error)
UTF-16 code units did not form valid Unicode scalar values.
ConflictingDeclaration(String)
The detected XML byte encoding contradicted the document declaration.
MissingUtf16Declaration
BOM-less UTF-16 input omitted the required explicit byte-order declaration.
InvalidUtf8(Utf8Error)
Input without an XML UTF-16 signature was not valid UTF-8.
Trait Implementations§
Source§impl Debug for XmlEncodingError
impl Debug for XmlEncodingError
Source§impl Display for XmlEncodingError
impl Display for XmlEncodingError
Source§impl Error for XmlEncodingError
impl Error for XmlEncodingError
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<FromUtf16Error> for XmlEncodingError
impl From<FromUtf16Error> for XmlEncodingError
Source§fn from(source: FromUtf16Error) -> Self
fn from(source: FromUtf16Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for XmlEncodingError
impl RefUnwindSafe for XmlEncodingError
impl Send for XmlEncodingError
impl Sync for XmlEncodingError
impl Unpin for XmlEncodingError
impl UnsafeUnpin for XmlEncodingError
impl UnwindSafe for XmlEncodingError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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