Skip to main content

Error

Type Alias Error 

Source
pub type Error = FromHexError;
Expand description

Errors than can occurs during HexString construction.

Refers to FromHexError for more details.

Aliased Type§

pub enum Error {
    InvalidHexCharacter {
        c: char,
        index: usize,
    },
    OddLength,
    InvalidStringLength,
}

Variants§

§

InvalidHexCharacter

An invalid character was found. Valid ones are: 0...9, a...f or A...F.

Fields

§index: usize
§

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.