vsdb 17.0.16

A std-collection-like database
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use parking_lot::Once;

/// Configures a process-unique base directory before the first engine use.
/// Integration test binaries run in separate processes, so one `Once` per
/// binary is sufficient even when several tests share this module.
pub fn setup() {
    static INIT: Once = Once::new();
    INIT.call_once(|| {
        let dir = std::env::temp_dir().join(format!(
            "vsdb_test_{}_{}",
            env!("CARGO_PKG_NAME"),
            rand::random::<u128>()
        ));
        vsdb::vsdb_configure(vsdb::VsdbOptions::new(dir)).unwrap();
    });
}