#[non_exhaustive]pub enum SerializerError<PushErr, FinErr> {
PushError(PushErr),
FinalizeError(FinErr),
SeqLengthUnknown,
Custom(SerdeCustomError),
}Expand description
The serialization error type
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.
PushError(PushErr)
A Flavor-specific error occurred while inserting data
FinalizeError(FinErr)
A Flavor-specific error occurred while finalizing
SeqLengthUnknown
A Seq or Map was attempted to be serialized with no length
hint, e.g. Serializer::serialize_seq(None) or
Serializer::serialize_map(None). This is unsupported in postcard.
Custom(SerdeCustomError)
Serde returned a Custom error
With the alloc or std features enabled, this will contain a formatted string.
Without these features, the error context is not retained
Trait Implementations§
Source§impl<PushErr, FinErr> Display for SerializerError<PushErr, FinErr>
impl<PushErr, FinErr> Display for SerializerError<PushErr, FinErr>
Source§impl<PopErr, FinErr> Error for SerializerError<PopErr, FinErr>
Available on crate features std or alloc only.
impl<PopErr, FinErr> Error for SerializerError<PopErr, FinErr>
Available on crate features
std or alloc only.Source§impl<PushErr, FinErr> Error for SerializerError<PushErr, FinErr>
impl<PushErr, FinErr> Error for SerializerError<PushErr, FinErr>
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<PushErr, FinErr> Freeze for SerializerError<PushErr, FinErr>
impl<PushErr, FinErr> RefUnwindSafe for SerializerError<PushErr, FinErr>where
PushErr: RefUnwindSafe,
FinErr: RefUnwindSafe,
impl<PushErr, FinErr> Send for SerializerError<PushErr, FinErr>
impl<PushErr, FinErr> Sync for SerializerError<PushErr, FinErr>
impl<PushErr, FinErr> Unpin for SerializerError<PushErr, FinErr>
impl<PushErr, FinErr> UnwindSafe for SerializerError<PushErr, FinErr>where
PushErr: UnwindSafe,
FinErr: 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