Function decode_context_payload
pub fn decode_context_payload(
datagram: &[u8],
) -> Result<(ContextId, &[u8]), ContextPayloadError>Available on crate feature
masque only.Expand description
Split an HTTP Datagram payload into its Context ID and the rest (RFC 9298 §5).
Non-minimal Context ID encodings are accepted. A context-0 payload longer
than MAX_UDP_PAYLOAD is an error the caller must answer by aborting the
stream; payloads of other contexts are returned as they are.