[][src]Trait display_bytes::ByteFormat

pub trait ByteFormat {
    fn fmt_bytes(&self, bytes: &[u8], f: &mut Formatter) -> Result;

    fn bytes_to_string(&self, bytes: &[u8]) -> String { ... }
}

Formats byte sequences in human-readable representations.

Required methods

fn fmt_bytes(&self, bytes: &[u8], f: &mut Formatter) -> Result

Encode the given byte-sequence in some human-readable format and print it to f.

Loading content...

Provided methods

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.

Loading content...

Implementors

impl ByteFormat for FormatBase64[src]

impl<'s> ByteFormat for FormatHex<'s>[src]

Loading content...