Expand description
Trace event types.
StructsΒ§
- ByteStr π
- Wrapper that serializes as a CBOR byte string (major type 2). Without this
wrapper, serializing
&[u8]via genericSerializeproduces a CBOR array of u8. - Subscription
Ref - A
(peer, request id)reference naming one subscription on one peer. - Trace
Event - A single event in a
.moqtracefile.
EnumsΒ§
- Derivation
Kind - How an upstream subscription came to serve a downstream one.
- Direction
- Direction of a message or stream relative to the recording endpoint.
- Error
Kind - What sort of failure an
Errorevent records. - Event
Data - Event-specific payload, discriminated by type.
- Peer
Role - Role a peer is acting in at connection time.
- Side
- Which end of a relay a peer sits on.
- Stream
Type - Data stream type.
ConstantsΒ§
- ERROR_
RAW_ CAP - The most bytes a recorder may put in an
Erroreventβs"raw". Fixed by the format β SPEC.md, Event 6, under the heading about the cap and"rawlen". - EVENT_
ANNOTATION π - EVENT_
CONTROL_ πMESSAGE - Event type discriminants, matching the specificationβs
"e"values. - EVENT_
ERROR π - EVENT_
OBJECT_ πHEADER - EVENT_
OBJECT_ πPAYLOAD - EVENT_
PEER_ πCONNECTED - EVENT_
PEER_ πDISCONNECTED - EVENT_
STATE_ πCHANGE - EVENT_
STREAM_ πCLOSED - EVENT_
STREAM_ πOPENED - EVENT_
SUBSCRIPTION_ πDERIVATION - REQUIRED_
COMMON_ πKEYS - The three keys every event carries whatever its type. All are required, so a value the reader cannot use is a malformed event rather than something to keep: there would be no event left to hang the kept key on.
- TAG_
UINT8_ πARRAY - Tag 64 marks a byte string as an array of unsigned 8-bit integers.
- TRACE_
ID_ LEN - Length of a trace ID, in bytes. Fixed by the format.
FunctionsΒ§
- as_
bytes π - Read a byte string, unwrapping the typed-array tag some encoders add.
- detail_
rank π - Where
detailsits in the levelsβ ordering, orNonefor a level this crate cannot place. - detail_
reaches π - Whether a recorder at
detailrecords everything a recorder atfloordoes. - get_
bytes π - Helper to extract byte string from a CBOR map by key.
- get_int π
- Helper to extract an i64 from a CBOR map by key. See
get_uint. - get_
message π - Read a control messageβs decoded
"msg"field. - get_
namespace π - Read a track namespace: an array of byte strings, tolerating text entries from encoders that lose the distinction.
- get_
text π - Helper to extract a text string from a CBOR map by key.
- get_
trace_ πid - Read a trace ID, refusing any length but the one the format fixes.
- get_
uint π - Helper to extract a u64 from a CBOR map by key.
- get_
value π - Helper to extract a value from a CBOR map by key.
- require_
direction π - require_
int π - require_
text π - require_
uint π - require_
value π - unrecognised_
keys π - Every entry on
pairsthat the event decoded from it does not write back out of a field of its own. Seeunrecognised, which the header uses for the same reason. - writes_
common_ πkey - Whether the common event fields account for
keyβ the required three always, and"p"only when a peer was actually read from it. - writes_
variant_ πkey - Whether
keyis written from one ofdataβs own fields β equivalently, on an event that was decoded, whether the decode used it. The common keys are not this functionβs business;writes_common_keyanswers for those.