Trait hex_conservative::parse::FromHex

source ·
pub trait FromHex: Sized {
    type Err: From<HexToBytesError> + Sized + Debug + Display;

    // Required method
    fn from_byte_iter<I>(iter: I) -> Result<Self, Self::Err>
       where I: Iterator<Item = Result<u8, HexToBytesError>> + ExactSizeIterator + DoubleEndedIterator;

    // Provided method
    fn from_hex(s: &str) -> Result<Self, Self::Err> { ... }
}
Expand description

Trait for objects that can be deserialized from hex strings.

Required Associated Types§

source

type Err: From<HexToBytesError> + Sized + Debug + Display

Error type returned while parsing hex string.

Required Methods§

source

fn from_byte_iter<I>(iter: I) -> Result<Self, Self::Err>

Produces an object from a byte iterator.

Provided Methods§

source

fn from_hex(s: &str) -> Result<Self, Self::Err>

Produces an object from a hex string.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromHex for [u8; 2]

source§

impl FromHex for [u8; 4]

source§

impl FromHex for [u8; 6]

source§

impl FromHex for [u8; 8]

source§

impl FromHex for [u8; 10]

source§

impl FromHex for [u8; 12]

source§

impl FromHex for [u8; 14]

source§

impl FromHex for [u8; 16]

source§

impl FromHex for [u8; 20]

source§

impl FromHex for [u8; 24]

source§

impl FromHex for [u8; 28]

source§

impl FromHex for [u8; 32]

source§

impl FromHex for [u8; 33]

source§

impl FromHex for [u8; 64]

source§

impl FromHex for [u8; 65]

source§

impl FromHex for [u8; 128]

source§

impl FromHex for [u8; 256]

source§

impl FromHex for [u8; 384]

source§

impl FromHex for [u8; 512]

Implementors§