Function domain::utils::base64::display [−][src]
pub fn display<B: ?Sized, W>(bytes: &B, f: &mut W) -> Result where
B: AsRef<[u8]>,
W: Write,
Encodes binary data in base64 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::base64; struct Foo<'a>(&'a [u8]); impl<'a> fmt::Display for Foo<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { base64::display(&self.0, f) } }