pub enum EnumDecodeError {
UnknownTag {
tag: u8,
enum_name: &'static str,
},
UnknownVariantId {
variant_id: u64,
enum_name: &'static str,
},
UnknownUnitVariantId {
variant_id: u64,
enum_name: &'static str,
},
UnknownNamedVariantId {
variant_id: u64,
enum_name: &'static str,
},
UnknownUnnamedVariantId {
variant_id: u64,
enum_name: &'static str,
},
MissingRequiredField {
field: &'static str,
enum_name: &'static str,
variant_name: &'static str,
},
FieldCountMismatch {
enum_name: &'static str,
variant_name: &'static str,
expected: usize,
actual: usize,
},
StructureHashMismatch {
enum_name: &'static str,
variant_name: &'static str,
expected: u64,
actual: u64,
},
}Expand description
Derive-specific error types for enum operations
Variants§
UnknownTag
UnknownVariantId
UnknownUnitVariantId
UnknownNamedVariantId
UnknownUnnamedVariantId
MissingRequiredField
FieldCountMismatch
StructureHashMismatch
Trait Implementations§
Source§impl Debug for EnumDecodeError
impl Debug for EnumDecodeError
Source§impl Display for EnumDecodeError
impl Display for EnumDecodeError
Source§impl Error for EnumDecodeError
impl Error for EnumDecodeError
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<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.
Auto Trait Implementations§
impl Freeze for EnumDecodeError
impl RefUnwindSafe for EnumDecodeError
impl Send for EnumDecodeError
impl Sync for EnumDecodeError
impl Unpin for EnumDecodeError
impl UnwindSafe for EnumDecodeError
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