Skip to main content

encode_to_slice

Function encode_to_slice 

Source
pub fn encode_to_slice<T>(bytes: T, out: &mut [u8]) -> Result<(), HexError>
where T: AsRef<[u8]>,
Expand description

Encode bytes into a caller-provided buffer.

out must be exactly 2 * bytes.len() long.

ยงErrors

Returns HexError::LengthMismatch if out is sized incorrectly.