Enum FromHexError
pub enum FromHexError
The error type for decoding a hex string into Vec<u8> or [u8; N].
Variants
-
InvalidHexCharacter { c: char, index: usize } An invalid character was found. Valid ones are:
0...9,a...forA...F.-
OddLength A hex string's length needs to be even, as two digits correspond to one byte.
-
InvalidStringLength If the hex string is decoded into a fixed sized container, such as an array, the hex string's length * 2 has to match the container's length.
Trait Implementations
impl Clone for FromHexError
fn clone(&self) -> FromHexError
impl Copy for FromHexError
impl Debug for FromHexError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for FromHexError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Error for FromHexError
impl PartialEq for FromHexError
fn eq(&self, other: &FromHexError) -> bool
impl StructuralPartialEq for FromHexError
Auto Trait Implementations
impl Freeze for FromHexError
impl RefUnwindSafe for FromHexError
impl Send for FromHexError
impl Sync for FromHexError
impl Unpin for FromHexError
impl UnsafeUnpin for FromHexError
impl UnwindSafe for FromHexError
Blanket Implementations
impl<T> Any for FromHexError
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FromHexError
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FromHexError
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for FromHexError
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for FromHexError
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for FromHexError
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for FromHexError
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for FromHexError
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FromHexError
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for FromHexError
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>