Skip to main content

create_test_rw_db_with_datadir

Function create_test_rw_db_with_datadir 

Source
pub fn create_test_rw_db_with_datadir<P: AsRef<Path>>(
    datadir: P,
) -> Arc<TempDatabase<DatabaseEnv>>
Available on crate features test-utils only.
Expand description

Create read/write database for testing within a data directory.

The database is created at datadir/db, and TempDatabase will clean up the entire datadir on drop.