Struct extfmt::Hexdump
[−]
[src]
pub struct Hexdump<'a> { /* fields omitted */ }
A formatting aid for pretty-printing a byte buffer,
not unlike the hexdump
utility.
Examples
use extfmt::*; let dump = Hexdump::new(&[1,2,3,4,5,6,255]); assert_eq!(format!("{}", dump), "00000000\t01 02 03 04 05 06 ff");
Methods
impl<'a> Hexdump<'a>
[src]
fn new(data: &'a [u8]) -> Self
[src]
Creates a new Hexdump instance from a byte slice.
fn show_index(&mut self, value: bool) -> &mut Self
[src]
Controls whether or not to show the current index at the beginning of each row.
Default: true
fn items_per_row(&mut self, value: usize) -> &mut Self
[src]
Controls the amount of bytes to print in each row.
Default: 16