encode_including_sentinels

Function encode_including_sentinels 

Source
pub fn encode_including_sentinels(source: &[u8], dest: &mut [u8]) -> usize
Expand description

Encodes the source buffer into the dest buffer, including the default sentinel values 0 around the encoded frame.

§Returns

The number of bytes written to in the dest buffer.

§Panics

This function will panic if the dest buffer is not large enough for the encoded message. You can calculate the size the dest buffer needs to be with the crate::max_encoding_length function.