Skip to main content

packet_parse

Function packet_parse 

Source
pub fn packet_parse(packet: &[u8]) -> Result<(u8, usize, Vec<&[u8]>)>
Expand description

Parse packet into frame slices. Returns (toc, payload_offset, frames).

Returned frame slices borrow from packet and are valid as long as packet lives. Use packet_parse_into to supply reusable storage and avoid allocating the returned vector.

ยงErrors

Returns an error if the packet cannot be parsed.