pub fn decode_header(buf: &[u8]) -> Result<(Header, &[u8]), MessageError>
Decode a header from buf, returning the header and a slice of the remaining payload bytes.
buf
Validates magic bytes, protocol version, and message type.