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, 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.

§Errors

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