encode_response_headers
def encode_response_headers(status: Int, headers: List[HpackHeader], mut out: List[UInt8]) Append the HEADERS-frame bytes for an HTTP/3 response to out.
Emits :status as the first field per RFC 9114 §4.3.2,
then the supplied application headers (all names lowercased).
The caller MUST NOT include :status in headers --
the reader rejects field sections that emit pseudo-headers
after a regular header (RFC 9114 §4.3 invariant), and this
writer skips application-pseudoheader emission entirely.
The caller owns the buffer and may reuse the same
List[UInt8] across HEADERS + DATA + trailers so the
underlying allocation amortises across the response. The
encoder appends only; it never reads from or truncates the
existing contents.