pub enum EncoderError {
Encode(String),
Decode(String),
InsufficientData,
StructDecode(StructDecodeError),
EnumDecode(EnumDecodeError),
}
Expand description
Errors that can occur during encoding or decoding operations.
Variants§
Encode(String)
The value could not be encoded (e.g., unsupported type or logic error).
Decode(String)
The value could not be decoded (e.g., invalid data, type mismatch, or schema evolution error).
InsufficientData
The buffer did not contain enough data to complete the operation.
StructDecode(StructDecodeError)
Struct-specific decode error
EnumDecode(EnumDecodeError)
Enum-specific decode error
Trait Implementations§
Source§impl Debug for EncoderError
impl Debug for EncoderError
Source§impl Display for EncoderError
impl Display for EncoderError
Source§impl Error for EncoderError
impl Error for EncoderError
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<EnumDecodeError> for EncoderError
impl From<EnumDecodeError> for EncoderError
Source§fn from(source: EnumDecodeError) -> Self
fn from(source: EnumDecodeError) -> Self
Converts to this type from the input type.
Source§impl From<StructDecodeError> for EncoderError
impl From<StructDecodeError> for EncoderError
Source§fn from(source: StructDecodeError) -> Self
fn from(source: StructDecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EncoderError
impl RefUnwindSafe for EncoderError
impl Send for EncoderError
impl Sync for EncoderError
impl Unpin for EncoderError
impl UnwindSafe for EncoderError
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