Skip to main content

make_qlog_writer

Function make_qlog_writer 

Source
pub fn make_qlog_writer<W>(
    inner: W,
    compression: QlogCompression,
) -> Result<QlogFileWriter>
where W: Write + Send + Sync + 'static,
Expand description

Wrap inner in the streaming encoder selected by compression and return a boxed Write that a qlog producer (e.g. quiche via set_qlog) writes into.

The generic W bound lets production call sites pass a std::fs::File while tests can pass an in-process buffer (e.g. Vec<u8>). For the common case of “open a file at this path and pick the compressor by extension” use make_qlog_writer_from_path.

No buffering is added here.