pub trait HexaDisplay {
// Required method
fn to_hexa_string(&self) -> String;
// Provided method
fn to_hexa(&self) -> String { ... }
}
Required Methods§
Sourcefn to_hexa_string(&self) -> String
fn to_hexa_string(&self) -> String
use to_string::HexaDisplay;
assert_eq!("0x12", 0x12.to_hexa_string());
assert_eq!("0xffffffee", (-0x12).to_hexa_string())