pub fn decode_header(bytes: &[u8]) -> Result<EnvelopeHeader, DecodeError>Expand description
Decode an envelope header from the front of bytes, following the
frozen-prefix discipline:
- need at least the 5-byte prefix to read
len+ver; - dispatch the full header length on
ver; - need the full header present; then parse the rest.
Never panics on malformed input — returns a typed DecodeError.