[][src]Trait hexutil::ToHex

pub trait ToHex: ToHexCore {
    fn to_hex(&self) -> String { ... }
}

A type that can be converted to a hexadecimal representation.

Provided methods

fn to_hex(&self) -> String

Get a hexadecimal representation.

struct Test(u16);

hexutil::impl_to_hex!(Test, 2, |self| self.0.to_le_bytes());

assert_eq!(Test(0x1234).to_hex(), "3412");
Loading content...

Implementors

Loading content...