Struct extfmt::Hexlify
[−]
[src]
pub struct Hexlify<'a>(pub &'a [u8]);
Formats a byte-buffer as a series of concatanated hex-pairs.
Implements the following formatting traits: - Display, Debug, LowerHex - Will format in all letters in lowercase. - UpperHex - Will format in all letters in uppercase
Examples
use extfmt::*; assert_eq!(format!("{}", Hexlify(&[122, 123, 134])), "7a7b86"); assert_eq!(format!("{:X}", Hexlify(&[122, 123, 134])), "7A7B86"); assert_eq!(format!("{:X}", Hexlify(&[122, 123, 134])), "7A7B86");