Skip to main content

human_byte_data

Function human_byte_data 

Source
pub fn human_byte_data<T: AsRef<[u8]>>(
    data: T,
    truncate_len: Option<usize>,
) -> String
Expand description

Format a byte slice for display: ASCII-printable data is shown as text, otherwise as shell-quoted text or hex (whichever is shorter). Truncated to truncate_len bytes with a trailing ... when set.