#[non_exhaustive]pub enum SerializationError {
BufferTooSmall,
InvalidData,
InvalidFormat,
Custom(i32),
}
Expand description
Error for map value (de)serialization.
This error type is predefined (in contrast to using generics) to save many kilobytes of binary size.
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.
BufferTooSmall
The provided buffer was too small.
InvalidData
The serialization could not succeed because the data was not in order. (e.g. too big to fit)
InvalidFormat
The deserialization could not succeed because the bytes are in an invalid format.
Custom(i32)
An implementation defined error that might contain more information than the other predefined error variants.
Trait Implementations§
Source§impl Clone for SerializationError
impl Clone for SerializationError
Source§fn clone(&self) -> SerializationError
fn clone(&self) -> SerializationError
Returns a copy 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 Debug for SerializationError
impl Debug for SerializationError
Source§impl Display for SerializationError
impl Display for SerializationError
Source§impl<S> From<SerializationError> for Error<S>
impl<S> From<SerializationError> for Error<S>
Source§fn from(v: SerializationError) -> Self
fn from(v: SerializationError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SerializationError
impl PartialEq for SerializationError
impl Eq for SerializationError
impl StructuralPartialEq for SerializationError
Auto Trait Implementations§
impl Freeze for SerializationError
impl RefUnwindSafe for SerializationError
impl Send for SerializationError
impl Sync for SerializationError
impl Unpin for SerializationError
impl UnwindSafe for SerializationError
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