pub fn display<Octets, Target>(octets: &Octets, f: &mut Target) -> Resultwhere
Octets: AsRef<[u8]> + ?Sized,
Target: Write,
Expand description
Encodes binary data in Base 16 and writes it into a format stream.
This function is intended to be used in implementations of formatting traits:
use core::fmt;
use domain::utils::base16;
struct Foo<'a>(&'a [u8]);
impl<'a> fmt::Display for Foo<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
base16::display(&self.0, f)
}
}