pub trait ToHexExt {
// Required method
fn encode_hex(&self) -> String;
}Available on crate feature
alloc only.Expand description
Encoding values as hex string.
This trait is implemented for all T which implement AsRef<[u8]>. This
includes String, str, Vec<u8> and [u8].
§Examples
use lowercase_hex::ToHexExt;
assert_eq!("Hello world!".encode_hex(), "48656c6c6f20776f726c6421");Required Methods§
Sourcefn encode_hex(&self) -> String
fn encode_hex(&self) -> String
Encode the hex strict representing self into the result.
Lower case letters are used (e.g. f9b4ca).