pub enum FromHexError {
InvalidLength(usize),
InvalidHexCharacter(usize, u8),
InvalidValue,
CustomStr(&'static str),
CustomString(String),
}
Expand description
An error occured while converting from a hexadecimal value.
Variants§
InvalidLength(usize)
The number of bytes is not valid.
InvalidHexCharacter(usize, u8)
The carachter at the given index is invalid.
InvalidValue
The value is not valid.
CustomStr(&'static str)
A custom error (static string reference).
CustomString(String)
A custom error (String
requires alloc
or std
feature).
Trait Implementations§
Source§impl Debug for FromHexError
impl Debug for FromHexError
Source§impl Display for FromHexError
impl Display for FromHexError
Source§impl Error for FromHexError
impl Error for FromHexError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Auto Trait Implementations§
impl Freeze for FromHexError
impl RefUnwindSafe for FromHexError
impl Send for FromHexError
impl Sync for FromHexError
impl Unpin for FromHexError
impl UnwindSafe for FromHexError
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