Function encode_into

Source
pub fn encode_into(src: &[u8], dst: &mut [u8]) -> Result<usize>
Expand description

Encodes bytes as Crockford Base32 into a provided buffer.

§Returns

The number of bytes written to the output buffer.

§Errors

This method will return an Error if:

§Examples

let offset = c32::encode_into(&[42, 42, 42], &mut dst)?;
assert_eq!(&dst[..offset], b"2MAHA");
assert_eq!(offset, 5);