pub trait Hex {
// Required method
fn hex<P>(self, prefix: P) -> String
where P: AsRef<str>;
}
Expand description
Convert the given type to hex.
§Examples
use array_bytes::Hex;
assert_eq!(5_201_314_u128.hex("0x"), "0x4f5da2");
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.