#[non_exhaustive]pub enum Error<E> {
Writer(E),
MapLength,
SeqLength,
StrLength,
DataLength,
FieldSkipped,
FormatError,
SerializeError(String),
}
Expand description
Serializing 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.
Writer(E)
Writer error
MapLength
Undetermined map length or too many items
SeqLength
Undetermined sequence length or too many items
StrLength
String size too large
DataLength
Byte-array size too large
FieldSkipped
Skipped a field in a struct using compact serializer
FormatError
Error formatting a collected string
SerializeError(String)
Available on crate features
std
or alloc
only.An error passed down from a serde::ser::Serialize
implementation
Trait Implementations§
Source§impl<E: Display + Debug> Error for Error<E>
impl<E: Display + Debug> Error for Error<E>
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()
impl<E: Eq> Eq for Error<E>
impl<E> StructuralPartialEq for Error<E>
Auto Trait Implementations§
impl<E> Freeze for Error<E>where
E: Freeze,
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<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