Skip to main content

SnapshotWriter

Type Alias SnapshotWriter 

Source
pub type SnapshotWriter = Arc<Mutex<Option<SqliteReporter>>>;
Expand description

Handle the activity holds for snapshot writes.

The shape — Arc<Mutex<Option<SqliteReporter>>> — is load-bearing because the runner shares the same handle for non-readout sqlite work (cadence flushes, shutdown finalisers); the inner Option reflects “sqlite init failed; degrade gracefully,” the Mutex serialises writes (sqlite isn’t Send), and the Arc shares across the activity / observer / readout-fire threads.

Snapshot capture goes through capture rather than locking and matching by hand — the helper hides the three-layer unwrap and treats lock-poisoning / writer-absent as silent no-ops (best-effort).

Aliased Type§

pub struct SnapshotWriter { /* private fields */ }