pub const fn const_encode<const N: usize, const PREFIX: bool>(
input: &[u8; N],
) -> Buffer<N, PREFIX>
Expand description
Encodes input
as a hex string into a Buffer
.
ยงExamples
const BUFFER: const_hex::Buffer<4> = const_hex::const_encode(b"kiwi");
assert_eq!(BUFFER.as_str(), "6b697769");