Skip to main content

Module reader

Module reader 

Available on crate features quic and std only.
Expand description

Reader for recorded qlog files, main schema draft 14.

The counterpart of the recorder: both serializations of the main schema are accepted, a contained JSON file (application/qlog+json) and the JSON text sequence (application/qlog+json-seq, RFC 7464) this crate writes.

Reading is schema-generic where the recorder is typed: event bodies stay serde_json::Value. The reader validates the file and trace envelope and resolves timestamps against the trace’s time reference, but preserves every event — including ones no EventView covers, and traces written by another implementation. Older qlog formats (draft-02 / qlog 0.3 and earlier) are rejected with an explicit error rather than guessed at.

Structs§

Event
One recorded event.
QlogFile
A decoded qlog file.
ReadLimits
Bounds applied while reading, so a hostile or accidental input cannot exhaust memory.
Trace
One trace: the events of a single recording, with their shared metadata.
VantagePoint
Where a trace was recorded.

Enums§

FileSchema
Serialization of a qlog file.
TimeFormat
How an event’s time is expressed.

Functions§

looks_like_qlog
Whether input plausibly starts a qlog file, for content-based detection.
read
Read a qlog file from memory, using the default ReadLimits.
read_from
Read a qlog file from a stream, collecting its events.
read_streaming
Read a qlog file from a stream, handing each event to on_event as it is decoded.
read_with_limits
Read a qlog file from memory, rejecting input that exceeds limits.