Expand description
Database Env configuration.
This module contains the main Configuration struct
for the database Environment, and types
related to configuration settings.
The main constructor is the ConfigBuilder.
These configurations are processed at runtime, meaning
the Env can/will dynamically adjust its behavior
based on these values.
§Example
use cuprate_database::{
ConcreteEnv, Env,
config::{ConfigBuilder, SyncMode}
};
let db_dir = tempfile::tempdir()?;
let config = ConfigBuilder::new(db_dir.path().to_path_buf().into())
// Use the fastest sync mode.
.sync_mode(SyncMode::Fast)
// Build into `Config`
.build();
// Open the database using this configuration.
let env = ConcreteEnv::open(config.clone())?;
// It's using the config we provided.
assert_eq!(env.config(), &config);Structs§
- Config
- Database
Envconfiguration. - Config
Builder - Builder for
Config.
Enums§
- Sync
Mode - Disk synchronization mode.
Constants§
- READER_
THREADS_ DEFAULT - Default value for
Config::reader_threads.