[][src]Trait parity_bytes::ToPretty

pub trait ToPretty {
    fn pretty(&self) -> PrettySlice;

    fn to_hex(&self) -> String { ... }
}

Trait to allow a type to be pretty-printed in format!, where unoverridable defaults cannot otherwise be avoided.

Required methods

fn pretty(&self) -> PrettySlice

Convert a type into a derivative form in order to make format! print it prettily.

Loading content...

Provided methods

fn to_hex(&self) -> String

Express the object as a hex string.

Loading content...

Implementors

impl<T: AsRef<[u8]>> ToPretty for T[src]

Loading content...