pub fn journal_capture_hook() -> (Arc<Mutex<GraphJournal>>, DeltaRecorder)Expand description
A shared journal plus a capture hook that records every emitted
CapturedDelta into it. Install the hook with
set_captured_delta_hook and keep the handle
to replay or persist the journal:
ⓘ
let (journal, hook) = journal_capture_hook();
kernel::graph::set_captured_delta_hook(Some(hook));
// ... drive live mutations through apply_graph_delta ...
let restored = journal.lock().unwrap().replay();The capture hook is one per-thread slot, so this replaces any previously installed hook. It is offered as the host’s journal-backed persistence path.