Trait HexaDisplay

Source
pub trait HexaDisplay {
    // Required method
    fn to_hexa_string(&self) -> String;

    // Provided method
    fn to_hexa(&self) -> String { ... }
}

Required Methods§

Source

fn to_hexa_string(&self) -> String

use to_string::HexaDisplay;
assert_eq!("0x12", 0x12.to_hexa_string());
assert_eq!("0xffffffee", (-0x12).to_hexa_string())

Provided Methods§

Source

fn to_hexa(&self) -> String

use to_string::HexaDisplay;
assert_eq!("0x12", 0x12.to_hexa());
assert_eq!("0xffffffee", (-0x12).to_hexa())

Implementors§