Function postcard::from_bytes_cobs

source ·
pub fn from_bytes_cobs<'a, T>(s: &'a mut [u8]) -> Result<T>where
    T: Deserialize<'a>,
Expand description

Deserialize a message of type T from a cobs-encoded byte slice. The unused portion (if any) of the byte slice is not returned. The used portion of the input slice is modified during deserialization (even if an error is returned). Therefore, if this is not desired, pass a clone of the original slice.