pub fn format_hex(data: &[u8], f: &mut Formatter<'_>) -> Result<(), Error>
Outputs hex into an object implementing fmt::Write.
fmt::Write
This is usually more efficient than going through a String using ToHex.
String
ToHex