pub struct Config {
pub path: PathBuf,
pub create_path: bool,
pub create_db: bool,
pub read_only: bool,
pub no_io: bool,
pub fs_locks: bool,
pub fs_locks_block: bool,
/* private fields */
}
Expand description
db-rs’s config that describes where the log file should be and how the database should behave. use Config::in_folder as a starting point.
Fields§
§path: PathBuf
folder where db-rs can write it’s log
create_path: bool
should db-rs create parent folders that don’t exist? Default: true
create_db: bool
should db-rs create a log if one doesn’t exist? Default: true
read_only: bool
should db-rs only read and not write? (good for analysis tooling) Default: false
no_io: bool
should db-rs avoid all IO? (good for tests) Default: false
fs_locks: bool
should db-rs guard it’s log file with a file lock? (good for CLIs) Default: true
fs_locks_block: bool
if using fs_locks, should we block while trying to aquire a lock? Default: false
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more