Trait ToHex

Source
pub trait ToHex {
    // Required methods
    fn to_hex(&self) -> String;
    fn to_lower_hex(&self) -> String;
    fn to_upper_hex(&self) -> String;
}
Expand description

Extension trait to convert byte slices and byte vectors to hex strings.

Required Methods§

Source

fn to_hex(&self) -> String

Converts the byte slice or vector to a hex string in lowercase.

Source

fn to_lower_hex(&self) -> String

Converts the byte slice or vector to a hex string in lowercase.

Source

fn to_upper_hex(&self) -> String

Converts the byte slice or vector to a hex string in uppercase.

Implementations on Foreign Types§

Source§

impl ToHex for &[u8]

Source§

impl ToHex for Vec<u8>

Implementors§