encoded_len

Function encoded_len 

Source
pub fn encoded_len<I>(input: I) -> usize
where I: IntoIterator<Item = u8>,
Expand description

Compute the encoded length (including the trailing END delimiter) without allocating.

use slipstream::{encoded_len, END, ESC};

assert_eq!(encoded_len([END, ESC, 0x01]), 6);