Function bonsaidb::core::arc_bytes::print_bytes[]

pub fn print_bytes<W>(slice: &[u8], writer: &mut W) -> Result<(), Error> where
    W: Write
Expand description

Formats the bytes contained in slice into the provided writer. This function groups the printed output in chukns of 8 hexadecimal characters, and inserts spaces between each group.

This function powers the Debug trait implementations within the crate.

let mut printed = String::default();
arc_bytes::print_bytes(b"\x01\x23\x45\x67\x89", &mut printed).unwrap();
assert_eq!(printed, "01234567 89");