pub enum StructDecodeError {
InvalidTag {
expected: u8,
actual: u8,
},
MissingRequiredField {
field: &'static str,
struct_name: &'static str,
},
FieldCountMismatch {
struct_name: &'static str,
expected: usize,
actual: usize,
},
StructureHashMismatch {
struct_name: &'static str,
expected: u64,
actual: u64,
},
}
Expand description
Derive-specific error types for struct operations
Variants§
Trait Implementations§
Source§impl Debug for StructDecodeError
impl Debug for StructDecodeError
Source§impl Display for StructDecodeError
impl Display for StructDecodeError
Source§impl Error for StructDecodeError
impl Error for StructDecodeError
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()
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 StructDecodeError
impl RefUnwindSafe for StructDecodeError
impl Send for StructDecodeError
impl Sync for StructDecodeError
impl Unpin for StructDecodeError
impl UnwindSafe for StructDecodeError
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