pub enum HexParseError {
WrongLength {
expected: usize,
expected_hex_chars: usize,
got: usize,
},
InvalidHex(FromHexError),
}Expand description
Errors from parsing a hex string into a fixed-size byte array.
Variants§
WrongLength
The hex string (after stripping 0x) had the wrong length.
Fields
InvalidHex(FromHexError)
The hex string contained a non-hex character.
Trait Implementations§
Source§impl Debug for HexParseError
impl Debug for HexParseError
Source§impl Display for HexParseError
impl Display for HexParseError
Source§impl Error for HexParseError
impl Error for HexParseError
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<FromHexError> for HexParseError
impl From<FromHexError> for HexParseError
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HexParseError
impl RefUnwindSafe for HexParseError
impl Send for HexParseError
impl Sync for HexParseError
impl Unpin for HexParseError
impl UnsafeUnpin for HexParseError
impl UnwindSafe for HexParseError
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