array_bytes

Function dehexify_slice_mut

Source
pub fn dehexify_slice_mut<H>(hex: H, slice_src: &mut [u8]) -> Result<&[u8]>
where H: AsRef<[u8]>,
Expand description

Dehexify hex into a mutable slice source.

ยงExamples

let mut array = [0; 17];

assert_eq!(
	array_bytes::dehexify_slice_mut("0x4c6f7665204a616e6520466f7265766572", &mut array),
	Ok(b"Love Jane Forever".as_slice())
);
assert_eq!(array, *b"Love Jane Forever");