pub enum HexError {
InvalidHex,
InvalidLength {
expected: usize,
got: usize,
},
}Expand description
Errors produced when decoding hexadecimal strings.
Requires feature encoding-hex.
In debug builds InvalidLength carries expected/got fields for
development debugging. In release builds this variant is opaque to
prevent leaking expected-length metadata.
Variants§
InvalidHex
The string is not valid hexadecimal.
InvalidLength
Length mismatch in debug builds (detailed).
Trait Implementations§
Source§impl Error for HexError
impl Error for HexError
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()
impl Eq for HexError
impl StructuralPartialEq for HexError
Auto Trait Implementations§
impl Freeze for HexError
impl RefUnwindSafe for HexError
impl Send for HexError
impl Sync for HexError
impl Unpin for HexError
impl UnsafeUnpin for HexError
impl UnwindSafe for HexError
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