Skip to main content

encode_to_slice

Function encode_to_slice 

Source
pub fn encode_to_slice(
    src: &[u8],
    dst_hex: &mut [u8],
    lowercase: bool,
) -> Result<usize, Error>
Expand description

Encode bytes into hex (lowercase or uppercase) into the provided output slice.

Returns the number of bytes written on success.

ยงErrors

Returns Error::OutputTooSmall if dst_hex is not large enough.