Skip to main content

open

Function open 

Source
pub fn open(
    db_path: impl AsRef<Path>,
) -> Result<(TraceSender, JoinHandle<()>), StoreError>
Expand description

Open (creating if needed) the SQLite trace database in best-effort mode, migrate its schema, and spawn the background writer task.

Returns a TraceSender for the hot path and the writer’s JoinHandle. The writer exits cleanly once every clone of the sender is dropped.

This is the backward-compatible convenience wrapper. Use open_with_receipts when you need durable (never-drop) mode.

§Errors

Returns StoreError::Sqlite if the database cannot be opened or migrated.