pub enum SerdeError<E> {
Value(ValueError),
Inner(E),
Finalization(E),
}
Expand description
Compound errors
Variants§
Value(ValueError)
The value could not be accessed.
Inner(E)
The value provided could not be serialized or deserialized or the traversal callback returned an error.
Finalization(E)
There was an error during finalization.
This is not to be returned by a TreeSerialize/TreeDeserialize implementation but only from a wrapper that creates and finalizes the the serializer/deserializer.
The Deserializer
has encountered an error only after successfully
deserializing a value. This is the case if there is additional unexpected data.
The deserialize_by_key()
update takes place but this
error will be returned.
A Serializer
may write checksums or additional framing data and fail with
this error during finalization after the value has been serialized.
Trait Implementations§
Source§impl<E: Clone> Clone for SerdeError<E>
impl<E: Clone> Clone for SerdeError<E>
Source§fn clone(&self) -> SerdeError<E>
fn clone(&self) -> SerdeError<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<E: Debug> Debug for SerdeError<E>
impl<E: Debug> Debug for SerdeError<E>
Source§impl<E> Display for SerdeError<E>
impl<E> Display for SerdeError<E>
Source§impl<E> Error for SerdeError<E>
impl<E> Error for SerdeError<E>
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<E> From<KeyError> for SerdeError<E>
impl<E> From<KeyError> for SerdeError<E>
Source§impl<E> From<ValueError> for SerdeError<E>
impl<E> From<ValueError> for SerdeError<E>
Source§fn from(source: ValueError) -> Self
fn from(source: ValueError) -> Self
Converts to this type from the input type.
Source§impl<E: PartialEq> PartialEq for SerdeError<E>
impl<E: PartialEq> PartialEq for SerdeError<E>
Source§impl<E> TryFrom<SerdeError<E>> for KeyError
impl<E> TryFrom<SerdeError<E>> for KeyError
Source§type Error = SerdeError<E>
type Error = SerdeError<E>
The type returned in the event of a conversion error.
Source§impl<E> TryFrom<SerdeError<E>> for ValueError
impl<E> TryFrom<SerdeError<E>> for ValueError
impl<E: Copy> Copy for SerdeError<E>
impl<E: Eq> Eq for SerdeError<E>
impl<E> StructuralPartialEq for SerdeError<E>
Auto Trait Implementations§
impl<E> Freeze for SerdeError<E>where
E: Freeze,
impl<E> RefUnwindSafe for SerdeError<E>where
E: RefUnwindSafe,
impl<E> Send for SerdeError<E>where
E: Send,
impl<E> Sync for SerdeError<E>where
E: Sync,
impl<E> Unpin for SerdeError<E>where
E: Unpin,
impl<E> UnwindSafe for SerdeError<E>where
E: UnwindSafe,
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