Skip to main content

decode

Function decode 

Source
pub fn decode(datagram: Bytes) -> Result<Datagram, DecodeError>
Expand description

Decodes an HTTP/3 datagram, sharing the payload buffer rather than copying.

The Quarter Stream ID is validated here rather than by the caller: RFC 9297 §2.1 makes an out-of-range value a connection error, which is only distinguishable from “no session owns this id” if decoding says so.