pub trait ByteFormat {
// Required method
fn fmt_bytes(&self, bytes: &[u8], f: &mut Formatter<'_>) -> Result;
// Provided method
fn bytes_to_string(&self, bytes: &[u8]) -> String { ... }
}
Expand description
Formats byte sequences in human-readable representations.
Required Methods§
Provided Methods§
Sourcefn bytes_to_string(&self, bytes: &[u8]) -> String
fn bytes_to_string(&self, bytes: &[u8]) -> String
Uses fmt_bytes()
to encode the byte-sequence and print it to a String
.
Not used directly except for testing. However, you may find it useful.