#[non_exhaustive]pub enum Error<DeError> {
XMLError(XMLError),
DeserializeFailed(DeError),
UnexpectedEvent {
expected_event_name: String,
found_event: String,
},
UnexpectedEndOfFile,
}
Expand description
Deserializer
error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
XMLError(XMLError)
A XML error occurred.
DeserializeFailed(DeError)
Failed to deserialize.
UnexpectedEvent
Unexpected event.
Fields
UnexpectedEndOfFile
Unexpected end of file.
Implementations§
Source§impl<DeError> Error<DeError>
impl<DeError> Error<DeError>
Sourcepub fn into_never_de_err(self) -> Error<Infallible>
pub fn into_never_de_err(self) -> Error<Infallible>
Returns Self
with DeError
as Infallible
.
§Panics
Will panic if Self
is the DeserializeFailed
variant.
Source§impl<DeError> Error<DeError>
impl<DeError> Error<DeError>
Sourcepub fn into_error<Err>(self) -> Err
pub fn into_error<Err>(self) -> Err
Converts Self
into Err
.
Trait Implementations§
Source§impl<DeError> Error for Error<DeError>
impl<DeError> Error for Error<DeError>
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<Error<Error<Infallible>>> for Error<Infallible>
impl From<Error<Error<Infallible>>> for Error<Infallible>
Auto Trait Implementations§
impl<DeError> Freeze for Error<DeError>where
DeError: Freeze,
impl<DeError> !RefUnwindSafe for Error<DeError>
impl<DeError> Send for Error<DeError>where
DeError: Send,
impl<DeError> Sync for Error<DeError>where
DeError: Sync,
impl<DeError> Unpin for Error<DeError>where
DeError: Unpin,
impl<DeError> !UnwindSafe for Error<DeError>
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