Skip to main content

Module recorder

Module recorder 

Available on crate feature dial9 only.
Expand description

The recorder builder. The recorder builder.

recorder assembles a Recorder: it builds the shared bus, registers your Sources, spawns the flush thread (and, with the pipeline feature, the background worker), and starts recording.

use dial9_core::buffer::DiskBuffer;
let recorder = dial9_core::recorder::recorder(DiskBuffer::single_file("/tmp/trace.bin")?)
    .build();
// record events through `recorder.handle()`.

This wraps low-level Recorder::start, which expects pre-built shared recording state with sources already registered. The Tokio integration reuses the same builder.

Structs§

RecorderBuilder
Builder for a runtime-agnostic Recorder. See recorder.

Traits§

RecorderSourceExt
A builder that can register Sources.

Functions§

recorder
Begin building a recorder backed by writer.
recorder_disabled
A recorder with recording permanently disabled: no flush thread, no sources, and handle returns a disabled handle.
recorder_or_disabled
Begin building a recorder backed by writer, or a writer-free disabled one when the writer could not be created.