Skip to main content

encode_prefixed

Function encode_prefixed 

Source
pub fn encode_prefixed(data: impl AsRef<[u8]>) -> String
Expand description

Encodes a byte slice as a "0x"-prefixed lowercase hexadecimal string.

ยงPanics

Never panics in practice: the output buffer is built from ASCII ("0x" plus ENCODE_PAIR entries), so String::from_utf8 always succeeds.