Function array_bytes::hex2array

source ·
pub fn hex2array<H, const N: usize>(hex: H) -> Result<[u8; N]>where
    H: AsRef<[u8]>,
Expand description

Just like hex2bytes but to a fixed length array.

Examples

assert_eq!(
	array_bytes::hex2array("0x4c6f7665204a616e6520466f7265766572"),
	Ok(*b"Love Jane Forever")
);