array_bytes

Function bytes2hex

Source
pub fn bytes2hex<P, B>(prefix: P, bytes: B) -> String
where P: AsRef<str>, B: AsRef<[u8]>,
Expand description

AsRef<[u8]> to String.

ยงExamples

assert_eq!(
	array_bytes::bytes2hex("0x", b"Love Jane Forever"),
	String::from("0x4c6f7665204a616e6520466f7265766572")
);