Enum FromHexError

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...f or A...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.

Implementations

impl Clone for FromHexError

fn clone(self: &Self) -> FromHexError

impl Copy for FromHexError

impl Debug for FromHexError

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Display for FromHexError

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Error for FromHexError

impl Freeze for FromHexError

impl PartialEq for FromHexError

fn eq(self: &Self, other: &FromHexError) -> bool

impl RefUnwindSafe for FromHexError

impl Send for FromHexError

impl StructuralPartialEq for FromHexError

impl Sync for FromHexError

impl Unpin for FromHexError

impl UnsafeUnpin for FromHexError

impl UnwindSafe for FromHexError

impl<T> Any for FromHexError

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for FromHexError

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for FromHexError

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for FromHexError

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for FromHexError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for FromHexError

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for FromHexError

fn to_string(self: &Self) -> String

impl<T, U> Into for FromHexError

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for FromHexError

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for FromHexError

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>