Skip to main content

FromHex

Trait FromHex 

pub trait FromHex: Sized {
    // Required method
    fn from_hex(input: &[u8], format: Format<'_>) -> Result<Self, DecodeError>;
}
Expand description

An owned destination for decoded bytes.

Implemented for Vec<u8> and arrays of any length. Implementations must honor the supplied format and reject malformed or incorrectly sized input.

Required Methods§

fn from_hex(input: &[u8], format: Format<'_>) -> Result<Self, DecodeError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl<const N: usize> FromHex for [u8; N]

§

fn from_hex(input: &[u8], format: Format<'_>) -> Result<[u8; N], DecodeError>

Implementors§

§

impl FromHex for Vec<u8>