FromHex

Trait FromHex 

Source
pub trait FromHex: Sized {
    // Required method
    fn from_byte_iter<I>(iter: I) -> Result<Self, Error>
       where I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator;

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

Trait for objects that can be deserialized from hex strings

Required Methods§

Source

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

Produce an object from a byte iterator

Provided Methods§

Source

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

Produce an object from a hex string

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromHex for Vec<u8>

Available on crate features std or alloc only.
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§

Source§

impl<const LEN: usize, const REVERSE_STR: bool> FromHex for Array<u8, LEN, REVERSE_STR>

Available on crate feature hex and (crate features std or alloc) only.
Source§

impl<const MIN_LEN: usize, const MAX_LEN: usize> FromHex for Confined<Vec<u8>, MIN_LEN, MAX_LEN>