pub fn hexdump<C, T, F>(cfg: C, buf: &T, f: F)
Expand description
Generate a hex dump of a Sized
object and call a closure to process each
hex dump line.
use dbgtools_hexdump::{Config, hexdump};
struct MyStruct {
eight: u8,
sixteen: u16,
thirtytwo: u32
}
let data = MyStruct { eight: 8, sixteen: 16, thirtytwo: 32 };
hexdump(Config::default(), &data, |offs, hex, ascii| {
println!("{:08x} {} {}", offs, hex, ascii);
});