Skip to main content

Module header

Module header 

Source
Expand description

Trace file header types.

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use ciborium::Value; πŸ”’
use crate::error::MoqTraceError; πŸ”’

StructsΒ§

SamplingInfo
Sampling and filtering metadata. Present only when events were dropped or filtered at the source.
SegmentInfo
Per-segment metadata.
TraceHeader
Session metadata written at the start of a .moqtrace file, and at the start of every segment in a segmented one.

EnumsΒ§

DetailLevel
Detail level β€” declares what was recorded.
DropPolicy
Drop policy applied when a sampled source could not keep up.
Perspective
Recording perspective β€” who captured the trace.

FunctionsΒ§

as_i64 πŸ”’
Read a signed integer, accepting the float form. See as_u64.
as_u64 πŸ”’
Read an unsigned integer, accepting the float form CBOR also permits.
deduplicated πŸ”’
The entries of a map to be written, with no key twice: the first entry for a key is kept in its place and the rest are dropped.
find πŸ”’
find_bool πŸ”’
find_text πŸ”’
find_uint πŸ”’
goes_to_store πŸ”’
Whether key belongs in a map’s unrecognised-key store rather than in one of the map’s own fields, given that map’s writes_key.
normalised πŸ”’
Rewrite a value into the encoding this format requires of a writer, leaving what it says alone.
number_value πŸ”’
Write a number as a CBOR integer when its value is integral, and as a float only when it is not.
required_text πŸ”’
Read a required text key, distinguishing β€œabsent” from β€œpresent and not text”.
required_uint πŸ”’
Read a required unsigned-integer key. See required_text.
same_key πŸ”’
Whether two keys about to be written are one key in the file.
store_entries πŸ”’
The store entries to write after a map’s own keys.
unrecognised πŸ”’
Every entry of pairs the decoded map does not write back out of a field of its own: a key this crate has never heard of, a key it knows whose value it could not use β€” and a second entry for a key whose first entry a field did take.
written_entries πŸ”’
Map entries a writer is about to emit out of pairs that came from a file: normalised into the encoding SPEC.md requires, and with no key written twice (deduplicated).