pub enum HexSerdeError {
MissingPrefix,
InvalidHex(String),
LengthMismatch {
expected: usize,
actual: usize,
},
}Expand description
Errors that can occur during hex (de)serialization.
Variants§
MissingPrefix
Input string must begin with 0x prefix.
InvalidHex(String)
Input contained non-hex characters or odd-length digits.
LengthMismatch
For fixed-size arrays: decoded byte length did not match the expected size.
Trait Implementations§
Source§impl Debug for HexSerdeError
impl Debug for HexSerdeError
Source§impl Display for HexSerdeError
impl Display for HexSerdeError
Source§impl Error for HexSerdeError
impl Error for HexSerdeError
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 Freeze for HexSerdeError
impl RefUnwindSafe for HexSerdeError
impl Send for HexSerdeError
impl Sync for HexSerdeError
impl Unpin for HexSerdeError
impl UnwindSafe for HexSerdeError
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